aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/TransitionsAnimation.java17
1 files changed, 13 insertions, 4 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/TransitionsAnimation.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/TransitionsAnimation.java
index 0bb7e1e3..c93e62bf 100755
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/TransitionsAnimation.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/TransitionsAnimation.java
@@ -148,16 +148,14 @@ public class TransitionsAnimation extends PropertiesAnimation {
} else {
MatchResult parts = REGEX_SYMBOL_NUMBER_UNIT.exec(val);
if (parts != null) {
- unit = REGEX_NON_PIXEL_ATTRS.test(key) || Transitions.transformRegex.test(key) ? "" : "px";
String part1 = parts.getGroup(1);
String part2 = parts.getGroup(2);
String part3 = parts.getGroup(3);
trsEnd = "" + Double.parseDouble(part2);
- if (unit.isEmpty() && part3 != null) {
- unit = part3;
- }
+ unit = REGEX_NON_PIXEL_ATTRS.test(key) ? "" : part3 == null || part3.isEmpty() ? "px" : part3;
+
if (trsStart.isEmpty()) {
trsStart = key.matches("scale") ? "1" : "0";
}
@@ -168,6 +166,17 @@ public class TransitionsAnimation extends PropertiesAnimation {
double en = Double.parseDouble(trsEnd);
trsEnd = "" + (st + (n*en));
}
+
+ // Deal with non px units like "%"
+ if (!unit.isEmpty() && !"px".equals(unit) && trsStart.matches("\\d+")) {
+ double start = Double.parseDouble(trsStart);
+ double to = Double.parseDouble(trsEnd);
+ g.css(key, to + unit);
+ start = to * start / g.cur(key, true);
+ trsStart = start + unit;
+ g.css(key, start + unit);
+ }
+
} else {
trsStart = "";
trsEnd = val;
> 121
{
  "name": "@vaadin/vaadin-core",
  "version": "23.3.7",
  "description": "Vaadin components is an evolving set of free, open sourced custom HTML elements for building mobile and desktop web applications in modern browsers.",
  "author": "Vaadin Ltd",
  "license": "Apache-2.0",
  "main": "vaadin-core.js",
  "dependencies": {
    "@vaadin/accordion": "23.3.8",
    "@vaadin/app-layout": "23.3.8",
    "@vaadin/avatar": "23.3.8",
    "@vaadin/avatar-group": "23.3.8",
    "@vaadin/button": "23.3.8",
    "@vaadin/checkbox": "23.3.8",
    "@vaadin/checkbox-group": "23.3.8",
    "@vaadin/combo-box": "23.3.8",
    "@vaadin/component-base": "23.3.8",
    "@vaadin/confirm-dialog": "23.3.8",
    "@vaadin/context-menu": "23.3.8",
    "@vaadin/custom-field": "23.3.8",
    "@vaadin/date-picker": "23.3.8",
    "@vaadin/date-time-picker": "23.3.8",
    "@vaadin/details": "23.3.8",
    "@vaadin/dialog": "23.3.8",
    "@vaadin/email-field": "23.3.8",
    "@vaadin/field-base": "23.3.8",
    "@vaadin/field-highlighter": "23.3.8",
    "@vaadin/form-layout": "23.3.8",
    "@vaadin/grid": "23.3.8",
    "@vaadin/horizontal-layout": "23.3.8",
    "@vaadin/icon": "23.3.8",
    "@vaadin/icons": "23.3.8",
    "@vaadin/input-container": "23.3.8",
    "@vaadin/integer-field": "23.3.8",
    "@polymer/iron-icon": "^3.0.1",
    "@polymer/iron-iconset-svg": "^3.0.1",
    "@polymer/iron-list": "^3.1.0",
    "@polymer/iron-meta": "^3.0.1",
    "@polymer/iron-resizable-behavior": "^3.0.1",
    "@vaadin/item": "23.3.8",
    "@vaadin/list-box": "23.3.8",
    "@vaadin/lit-renderer": "23.3.8",
    "@vaadin/login": "23.3.8",
    "@vaadin/menu-bar": "23.3.8",
    "@vaadin/message-input": "23.3.8",
    "@vaadin/message-list": "23.3.8",
    "@vaadin/multi-select-combo-box": "23.3.8",
    "@vaadin/notification": "23.3.8",
    "@vaadin/number-field": "23.3.8",
    "@vaadin/password-field": "23.3.8",
    "@vaadin/polymer-legacy-adapter": "23.3.8",
    "@vaadin/progress-bar": "23.3.8",
    "@vaadin/radio-group": "23.3.8",
    "@vaadin/scroller": "23.3.8",
    "@vaadin/select": "23.3.8",
    "@vaadin/split-layout": "23.3.8",
    "@vaadin/tabs": "23.3.8",
    "@vaadin/tabsheet": "23.3.8",
    "@vaadin/text-area": "23.3.8",
    "@vaadin/text-field": "23.3.8",
    "@vaadin/time-picker": "23.3.8",
    "@vaadin/tooltip": "23.3.8",
    "@vaadin/upload": "23.3.8",
    "@vaadin/vaadin-accordion": "23.3.8",
    "@vaadin/vaadin-app-layout": "23.3.8",
    "@vaadin/vaadin-avatar": "23.3.8",
    "@vaadin/vaadin-button": "23.3.8",
    "@vaadin/vaadin-checkbox": "23.3.8",
    "@vaadin/vaadin-combo-box": "23.3.8",
    "@vaadin/vaadin-confirm-dialog": "23.3.8",
    "@vaadin/vaadin-context-menu": "23.3.8",
    "@vaadin/vaadin-custom-field": "23.3.8",
    "@vaadin/vaadin-date-picker": "23.3.8",
    "@vaadin/vaadin-date-time-picker": "23.3.8",
    "@vaadin/vaadin-details": "23.3.8",
    "@vaadin/vaadin-development-mode-detector": "2.0.6",
    "@vaadin/vaadin-dialog": "23.3.8",
    "@vaadin/vaadin-form-layout": "23.3.8",
    "@vaadin/vaadin-grid": "23.3.8",
    "@vaadin/vaadin-icon": "23.3.8",
    "@vaadin/vaadin-icons": "23.3.8",
    "@vaadin/vaadin-item": "23.3.8",
    "@vaadin/vaadin-list-box": "23.3.8",
    "@vaadin/vaadin-list-mixin": "23.3.8",
    "@vaadin/vaadin-login": "23.3.8",
    "@vaadin/vaadin-lumo-styles": "23.3.8",
    "@vaadin/vaadin-material-styles": "23.3.8",
    "@vaadin/vaadin-menu-bar": "23.3.8",
    "@vaadin/vaadin-messages": "23.3.8",
    "@vaadin/vaadin-notification": "23.3.8",
    "@vaadin/vaadin-ordered-layout": "23.3.8",
    "@vaadin/vaadin-overlay": "23.3.8",
    "@vaadin/vaadin-progress-bar": "23.3.8",
    "@vaadin/vaadin-radio-button": "23.3.8",
    "@vaadin/router": "1.7.4",
    "@vaadin/vaadin-select": "23.3.8",
    "@vaadin/vaadin-split-layout": "23.3.8",
    "@vaadin/vaadin-tabs": "23.3.8",
    "@vaadin/vaadin-template-renderer": "23.3.8",
    "@vaadin/vaadin-text-field": "23.3.8",
    "@vaadin/vaadin-themable-mixin": "23.3.8",
    "@vaadin/vaadin-time-picker": "23.3.8",
    "@vaadin/vaadin-upload": "23.3.8",
    "@vaadin/vaadin-usage-statistics": "2.1.2",
    "@vaadin/vaadin-virtual-list": "23.3.8",
    "@vaadin/vertical-layout": "23.3.8",
    "@vaadin/virtual-list": "23.3.8"
  },
  "files": [
    "vaadin-core.js"
  ],
  "keywords": [
    "vaadin",
    "core",
    "elements",
    "web",
    "components",
    "webcomponents",
    "web-components"
  ]
}