@angular/cdk 16.2.2 → 16.2.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.
package/fesm2022/cdk.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Version } from '@angular/core';
2
2
 
3
3
  /** Current version of the Angular Component Development Kit. */
4
- const VERSION = new Version('16.2.2');
4
+ const VERSION = new Version('16.2.4');
5
5
 
6
6
  export { VERSION };
7
7
  //# sourceMappingURL=cdk.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cdk.mjs","sources":["../../../../../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('16.2.2');\n"],"names":[],"mappings":";;AAUA;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;;;"}
1
+ {"version":3,"file":"cdk.mjs","sources":["../../../../../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('16.2.4');\n"],"names":[],"mappings":";;AAUA;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;;;"}
@@ -1122,13 +1122,21 @@ class DragRef {
1122
1122
  ? this.constrainPosition(point, this, this._initialClientRect, this._pickupPositionInElement)
1123
1123
  : point;
1124
1124
  if (this.lockAxis === 'x' || dropContainerLock === 'x') {
1125
- y = this._pickupPositionOnPage.y;
1125
+ y =
1126
+ this._pickupPositionOnPage.y -
1127
+ (this.constrainPosition ? this._pickupPositionInElement.y : 0);
1126
1128
  }
1127
1129
  else if (this.lockAxis === 'y' || dropContainerLock === 'y') {
1128
- x = this._pickupPositionOnPage.x;
1130
+ x =
1131
+ this._pickupPositionOnPage.x -
1132
+ (this.constrainPosition ? this._pickupPositionInElement.x : 0);
1129
1133
  }
1130
1134
  if (this._boundaryRect) {
1131
- const { x: pickupX, y: pickupY } = this._pickupPositionInElement;
1135
+ // If not using a custom constrain we need to account for the pickup position in the element
1136
+ // otherwise we do not need to do this, as it has already been accounted for
1137
+ const { x: pickupX, y: pickupY } = !this.constrainPosition
1138
+ ? this._pickupPositionInElement
1139
+ : { x: 0, y: 0 };
1132
1140
  const boundaryRect = this._boundaryRect;
1133
1141
  const { width: previewWidth, height: previewHeight } = this._getPreviewRect();
1134
1142
  const minY = boundaryRect.top + pickupY;