@vvfx/sdk 0.2.2-beta.11 → 0.2.2-beta.12

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/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@
3
3
  * Description: TODO
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 赤芍,何即,不择,意绮
6
- * Version: v0.2.2-beta.11
6
+ * Version: v0.2.2-beta.12
7
7
  */
8
8
 
9
9
  'use strict';
@@ -55360,8 +55360,8 @@ var TransformGizmo = /*#__PURE__*/ function(Gizmo) {
55360
55360
  }
55361
55361
  var selectedItem = (_selectedItems_ = selectedItems[0]) != null ? _selectedItems_ : undefined;
55362
55362
  // html卡片内容在非自动缩放的情况下,拖动的时候内容自适应,因此与智能画板一样,需要默认是自由缩放(即自由改大小)
55363
- var isAutoFitContentCardItem = selectedItem && isCardItem(selectedItem) && !selectedItem.isAutoScale;
55364
- var isShiftLockScale = selectedItem && selectedItems.length === 1 && (isFrameItem(selectedItem) || isAutoFitContentCardItem) ? !this.isShiftDown : this.isShiftDown;
55363
+ var isSingleAutoFitContentCardItem = selectedItems.length === 1 && selectedItem && isCardItem(selectedItem) && !selectedItem.isAutoScale;
55364
+ var isShiftLockScale = selectedItem && selectedItems.length === 1 && (isFrameItem(selectedItem) || isSingleAutoFitContentCardItem) ? !this.isShiftDown : this.isShiftDown;
55365
55365
  var farthestCorner = this.scaleParam.farthestCorner;
55366
55366
  var isValidScale = (scaleCorner.x - farthestCorner.x) * (this.cursorPoint.x - farthestCorner.x) > 0 && (scaleCorner.y - farthestCorner.y) * (this.cursorPoint.y - farthestCorner.y) > 0;
55367
55367
  if (!isValidScale && this.isLockScale && !this.isShiftDown) {
@@ -55435,7 +55435,7 @@ var TransformGizmo = /*#__PURE__*/ function(Gizmo) {
55435
55435
  newWidth,
55436
55436
  newHeight
55437
55437
  ], translation1);
55438
- } else if (isAutoFitContentCardItem) {
55438
+ } else if (isSingleAutoFitContentCardItem && selectedItem && isCardItem(selectedItem)) {
55439
55439
  var currentWidth1 = selectedItem.pixelWidth;
55440
55440
  var currentHeight1 = selectedItem.pixelHeight;
55441
55441
  var newWidth1 = currentWidth1 * resultScalar1.x;
@@ -55452,16 +55452,6 @@ var TransformGizmo = /*#__PURE__*/ function(Gizmo) {
55452
55452
  height: newHeight1
55453
55453
  }
55454
55454
  });
55455
- } else if (selectedItem && selectedItems.length === 1 && isCardItem(selectedItem)) {
55456
- void this._pageDataUtils.setItemProperty({
55457
- itemId: selectedItem.id,
55458
- type: SDKItemType.CARD,
55459
- property: {
55460
- width: selectedItem.width * resultScalar1.x,
55461
- height: selectedItem.height * resultScalar1.y
55462
- }
55463
- });
55464
- this._pageDataUtils.moveItem(selectedItem.id, translation1);
55465
55455
  } else {
55466
55456
  // 普通元素的缩放逻辑
55467
55457
  selectedItems.forEach(function(item) {
@@ -96581,7 +96571,7 @@ SDK.config = BaseConfig;
96581
96571
  var config = SDK.config.itemConfig.cardConfig.cardTypes.find(function(t) {
96582
96572
  return t.type === _this.cardType;
96583
96573
  });
96584
- return !!(config == null ? void 0 : config.autoScale);
96574
+ return (config == null ? void 0 : config.autoScale) !== false;
96585
96575
  }
96586
96576
  },
96587
96577
  {