@angular/cdk 12.1.3 → 12.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -92,7 +92,9 @@
92
92
  * that exited before the base transform was applied.
93
93
  */
94
94
  function combineTransforms(transform, initialTransform) {
95
- return initialTransform ? (transform + ' ' + initialTransform) : transform;
95
+ return initialTransform && initialTransform != 'none' ?
96
+ (transform + ' ' + initialTransform) :
97
+ transform;
96
98
  }
97
99
 
98
100
  /**
@@ -1232,8 +1234,12 @@
1232
1234
  var transform = getTransform(x, y);
1233
1235
  // Cache the previous transform amount only after the first drag sequence, because
1234
1236
  // we don't want our own transforms to stack on top of each other.
1237
+ // Should be excluded none because none + translate3d(x, y, x) is invalid css
1235
1238
  if (this._initialTransform == null) {
1236
- this._initialTransform = this._rootElement.style.transform || '';
1239
+ this._initialTransform = this._rootElement.style.transform
1240
+ && this._rootElement.style.transform != 'none'
1241
+ ? this._rootElement.style.transform
1242
+ : '';
1237
1243
  }
1238
1244
  // Preserve the previous `transform` value, if there was one. Note that we apply our own
1239
1245
  // transform before the user's, because things like rotation can affect which direction