@vvfx/sdk 0.2.2-beta.5 → 0.2.2-beta.6
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/html-overlay/overlay-transform.d.ts +1 -1
- package/dist/index.js +15 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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.
|
|
6
|
+
* Version: v0.2.2-beta.6
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -55577,6 +55577,16 @@ var TransformGizmo = /*#__PURE__*/ function(Gizmo) {
|
|
|
55577
55577
|
newWidth,
|
|
55578
55578
|
newHeight
|
|
55579
55579
|
], translation1);
|
|
55580
|
+
} else if (selectedItem && selectedItems.length === 1 && isCardItem(selectedItem)) {
|
|
55581
|
+
void this._pageDataUtils.setItemProperty({
|
|
55582
|
+
itemId: selectedItem.id,
|
|
55583
|
+
type: SDKItemType.CARD,
|
|
55584
|
+
property: {
|
|
55585
|
+
width: selectedItem.width * resultScalar1.x,
|
|
55586
|
+
height: selectedItem.height * resultScalar1.y
|
|
55587
|
+
}
|
|
55588
|
+
});
|
|
55589
|
+
this._pageDataUtils.moveItem(selectedItem.id, translation1);
|
|
55580
55590
|
} else {
|
|
55581
55591
|
// 普通元素的缩放逻辑
|
|
55582
55592
|
selectedItems.forEach(function(item) {
|
|
@@ -91843,14 +91853,13 @@ function syncElementStackOrder(_container, elements) {
|
|
|
91843
91853
|
});
|
|
91844
91854
|
}
|
|
91845
91855
|
|
|
91846
|
-
function getCardOverlayBoxStyle(box, width, height, offsetX, offsetY,
|
|
91856
|
+
function getCardOverlayBoxStyle(box, width, height, offsetX, offsetY, _autoScale) {
|
|
91847
91857
|
if (offsetX === void 0) offsetX = 0;
|
|
91848
91858
|
if (offsetY === void 0) offsetY = 0;
|
|
91849
|
-
if (autoScale === void 0) autoScale = true;
|
|
91850
91859
|
if (box.corners.length === 4 && width > 0 && height > 0) {
|
|
91851
91860
|
var _box_corners = box.corners, rightTop = _box_corners[0], leftBottom = _box_corners[2], leftTop = _box_corners[3];
|
|
91852
|
-
var contentWidth =
|
|
91853
|
-
var contentHeight =
|
|
91861
|
+
var contentWidth = width;
|
|
91862
|
+
var contentHeight = height;
|
|
91854
91863
|
var a = (rightTop.x - leftTop.x) / contentWidth;
|
|
91855
91864
|
var b = (rightTop.y - leftTop.y) / contentWidth;
|
|
91856
91865
|
var c = (leftBottom.x - leftTop.x) / contentHeight;
|
|
@@ -95224,8 +95233,7 @@ var SDK = /*#__PURE__*/ function() {
|
|
|
95224
95233
|
* @param ignoreClamp 是否忽视约束
|
|
95225
95234
|
*/ _proto.setPageZoom = function setPageZoom(zoom, center, ignoreClamp) {
|
|
95226
95235
|
EFFECTS.assertExist(this._pageData);
|
|
95227
|
-
this.
|
|
95228
|
-
this._pageDataUtils.setPageZoom(this._pageData.property.zoom, center, ignoreClamp);
|
|
95236
|
+
this._pageDataUtils.setPageZoom(zoom, center, ignoreClamp);
|
|
95229
95237
|
this._gestureHandler.render();
|
|
95230
95238
|
};
|
|
95231
95239
|
/**
|