@idraw/core 0.2.0-alpha.22 → 0.2.0-alpha.26
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.cjs.js +92 -74
- package/dist/index.es.js +92 -74
- package/dist/index.global.js +92 -74
- package/dist/index.global.min.js +1 -1
- package/package.json +6 -6
package/dist/index.global.js
CHANGED
|
@@ -87,7 +87,7 @@ var iDrawCore = (function () {
|
|
|
87
87
|
function str4() {
|
|
88
88
|
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
|
89
89
|
}
|
|
90
|
-
return ""
|
|
90
|
+
return "".concat(str4()).concat(str4(), "-").concat(str4(), "-").concat(str4(), "-").concat(str4(), "-").concat(str4()).concat(str4()).concat(str4());
|
|
91
91
|
}
|
|
92
92
|
function deepClone$6(target) {
|
|
93
93
|
function _clone(t) {
|
|
@@ -203,7 +203,7 @@ var iDrawCore = (function () {
|
|
|
203
203
|
function parseHTMLToDataURL$2(html, opts) {
|
|
204
204
|
var width = opts.width, height = opts.height;
|
|
205
205
|
return new Promise(function (resolve, reject) {
|
|
206
|
-
var _svg = "\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\""
|
|
206
|
+
var _svg = "\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"".concat(width || '', "\" height = \"").concat(height || '', "\">\n <foreignObject width=\"100%\" height=\"100%\">\n <div xmlns = \"http://www.w3.org/1999/xhtml\">\n ").concat(html, "\n </div>\n </foreignObject>\n </svg>\n ");
|
|
207
207
|
var blob = new Blob([_svg], { type: 'image/svg+xml;charset=utf-8' });
|
|
208
208
|
var reader = new FileReader();
|
|
209
209
|
reader.readAsDataURL(blob);
|
|
@@ -425,11 +425,11 @@ var iDrawCore = (function () {
|
|
|
425
425
|
Context.prototype.setFont = function (opts) {
|
|
426
426
|
var strList = [];
|
|
427
427
|
if (opts.fontWeight === 'bold') {
|
|
428
|
-
strList.push(""
|
|
428
|
+
strList.push("".concat(opts.fontWeight));
|
|
429
429
|
}
|
|
430
|
-
strList.push(this._doSize(opts.fontSize || 12)
|
|
431
|
-
strList.push(""
|
|
432
|
-
this._ctx.font = ""
|
|
430
|
+
strList.push("".concat(this._doSize(opts.fontSize || 12), "px"));
|
|
431
|
+
strList.push("".concat(opts.fontFamily || 'sans-serif'));
|
|
432
|
+
this._ctx.font = "".concat(strList.join(' '));
|
|
433
433
|
};
|
|
434
434
|
Context.prototype.setTextBaseline = function (baseline) {
|
|
435
435
|
this._ctx.textBaseline = baseline;
|
|
@@ -504,16 +504,16 @@ var iDrawCore = (function () {
|
|
|
504
504
|
return isColorStr$4(value);
|
|
505
505
|
}
|
|
506
506
|
function imageURL$3(value) {
|
|
507
|
-
return (typeof value === 'string' && /^(http:\/\/|https:\/\/|\.\/|\/)/.test(""
|
|
507
|
+
return (typeof value === 'string' && /^(http:\/\/|https:\/\/|\.\/|\/)/.test("".concat(value)));
|
|
508
508
|
}
|
|
509
509
|
function imageBase64$3(value) {
|
|
510
|
-
return (typeof value === 'string' && /^(data:image\/)/.test(""
|
|
510
|
+
return (typeof value === 'string' && /^(data:image\/)/.test("".concat(value)));
|
|
511
511
|
}
|
|
512
512
|
function imageSrc$3(value) {
|
|
513
513
|
return (imageBase64$3(value) || imageURL$3(value));
|
|
514
514
|
}
|
|
515
515
|
function svg$3(value) {
|
|
516
|
-
return (typeof value === 'string' && /^(<svg[\s]{1,}|<svg>)/i.test(
|
|
516
|
+
return (typeof value === 'string' && /^(<svg[\s]{1,}|<svg>)/i.test("".concat(value).trim()) && /<\/[\s]{0,}svg>$/i.test("".concat(value).trim()));
|
|
517
517
|
}
|
|
518
518
|
function html$3(value) {
|
|
519
519
|
var result = false;
|
|
@@ -831,19 +831,24 @@ var iDrawCore = (function () {
|
|
|
831
831
|
this._initParentEvent();
|
|
832
832
|
};
|
|
833
833
|
ScreenWatcher.prototype._initParentEvent = function () {
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
if (target.
|
|
839
|
-
target.
|
|
834
|
+
try {
|
|
835
|
+
var target = window;
|
|
836
|
+
var targetOrigin = target.origin;
|
|
837
|
+
while (target.self !== target.top) {
|
|
838
|
+
if (target.self !== target.parent) {
|
|
839
|
+
if (target.origin === targetOrigin) {
|
|
840
|
+
target.parent.window.addEventListener('mousemove', this._listSameOriginParentWindow.bind(this), false);
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
target = target.parent;
|
|
844
|
+
if (!target) {
|
|
845
|
+
break;
|
|
840
846
|
}
|
|
841
|
-
}
|
|
842
|
-
target = target.parent;
|
|
843
|
-
if (!target) {
|
|
844
|
-
break;
|
|
845
847
|
}
|
|
846
848
|
}
|
|
849
|
+
catch (err) {
|
|
850
|
+
console.warn(err);
|
|
851
|
+
}
|
|
847
852
|
};
|
|
848
853
|
ScreenWatcher.prototype._listenHover = function (e) {
|
|
849
854
|
e.preventDefault();
|
|
@@ -1020,7 +1025,7 @@ var iDrawCore = (function () {
|
|
|
1020
1025
|
var keys = Object.keys(_style);
|
|
1021
1026
|
var styleStr = '';
|
|
1022
1027
|
keys.forEach(function (key) {
|
|
1023
|
-
styleStr += key
|
|
1028
|
+
styleStr += "".concat(key, ":").concat(_style[key] || '', ";");
|
|
1024
1029
|
});
|
|
1025
1030
|
dom.setAttribute('style', styleStr);
|
|
1026
1031
|
}
|
|
@@ -1477,8 +1482,8 @@ var iDrawCore = (function () {
|
|
|
1477
1482
|
this[_displayCanvas].width = width * devicePixelRatio;
|
|
1478
1483
|
this[_displayCanvas].height = height * devicePixelRatio;
|
|
1479
1484
|
setStyle(this[_displayCanvas], {
|
|
1480
|
-
width: width
|
|
1481
|
-
height: height
|
|
1485
|
+
width: "".concat(width, "px"),
|
|
1486
|
+
height: "".concat(height, "px"),
|
|
1482
1487
|
});
|
|
1483
1488
|
};
|
|
1484
1489
|
Board.prototype[_parsePrivateOptions] = function (opts) {
|
|
@@ -1626,7 +1631,7 @@ var iDrawCore = (function () {
|
|
|
1626
1631
|
function str4() {
|
|
1627
1632
|
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
|
1628
1633
|
}
|
|
1629
|
-
return ""
|
|
1634
|
+
return "".concat(str4()).concat(str4(), "-").concat(str4(), "-").concat(str4(), "-").concat(str4(), "-").concat(str4()).concat(str4()).concat(str4());
|
|
1630
1635
|
}
|
|
1631
1636
|
function deepClone$5(target) {
|
|
1632
1637
|
function _clone(t) {
|
|
@@ -1742,7 +1747,7 @@ var iDrawCore = (function () {
|
|
|
1742
1747
|
function parseHTMLToDataURL$1(html, opts) {
|
|
1743
1748
|
var width = opts.width, height = opts.height;
|
|
1744
1749
|
return new Promise(function (resolve, reject) {
|
|
1745
|
-
var _svg = "\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\""
|
|
1750
|
+
var _svg = "\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"".concat(width || '', "\" height = \"").concat(height || '', "\">\n <foreignObject width=\"100%\" height=\"100%\">\n <div xmlns = \"http://www.w3.org/1999/xhtml\">\n ").concat(html, "\n </div>\n </foreignObject>\n </svg>\n ");
|
|
1746
1751
|
var blob = new Blob([_svg], { type: 'image/svg+xml;charset=utf-8' });
|
|
1747
1752
|
var reader = new FileReader();
|
|
1748
1753
|
reader.readAsDataURL(blob);
|
|
@@ -1964,11 +1969,11 @@ var iDrawCore = (function () {
|
|
|
1964
1969
|
Context.prototype.setFont = function (opts) {
|
|
1965
1970
|
var strList = [];
|
|
1966
1971
|
if (opts.fontWeight === 'bold') {
|
|
1967
|
-
strList.push(""
|
|
1972
|
+
strList.push("".concat(opts.fontWeight));
|
|
1968
1973
|
}
|
|
1969
|
-
strList.push(this._doSize(opts.fontSize || 12)
|
|
1970
|
-
strList.push(""
|
|
1971
|
-
this._ctx.font = ""
|
|
1974
|
+
strList.push("".concat(this._doSize(opts.fontSize || 12), "px"));
|
|
1975
|
+
strList.push("".concat(opts.fontFamily || 'sans-serif'));
|
|
1976
|
+
this._ctx.font = "".concat(strList.join(' '));
|
|
1972
1977
|
};
|
|
1973
1978
|
Context.prototype.setTextBaseline = function (baseline) {
|
|
1974
1979
|
this._ctx.textBaseline = baseline;
|
|
@@ -2043,16 +2048,16 @@ var iDrawCore = (function () {
|
|
|
2043
2048
|
return isColorStr$3(value);
|
|
2044
2049
|
}
|
|
2045
2050
|
function imageURL$2(value) {
|
|
2046
|
-
return (typeof value === 'string' && /^(http:\/\/|https:\/\/|\.\/|\/)/.test(""
|
|
2051
|
+
return (typeof value === 'string' && /^(http:\/\/|https:\/\/|\.\/|\/)/.test("".concat(value)));
|
|
2047
2052
|
}
|
|
2048
2053
|
function imageBase64$2(value) {
|
|
2049
|
-
return (typeof value === 'string' && /^(data:image\/)/.test(""
|
|
2054
|
+
return (typeof value === 'string' && /^(data:image\/)/.test("".concat(value)));
|
|
2050
2055
|
}
|
|
2051
2056
|
function imageSrc$2(value) {
|
|
2052
2057
|
return (imageBase64$2(value) || imageURL$2(value));
|
|
2053
2058
|
}
|
|
2054
2059
|
function svg$2(value) {
|
|
2055
|
-
return (typeof value === 'string' && /^(<svg[\s]{1,}|<svg>)/i.test(
|
|
2060
|
+
return (typeof value === 'string' && /^(<svg[\s]{1,}|<svg>)/i.test("".concat(value).trim()) && /<\/[\s]{0,}svg>$/i.test("".concat(value).trim()));
|
|
2056
2061
|
}
|
|
2057
2062
|
function html$2(value) {
|
|
2058
2063
|
var result = false;
|
|
@@ -2379,7 +2384,7 @@ var iDrawCore = (function () {
|
|
|
2379
2384
|
function str4() {
|
|
2380
2385
|
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
|
2381
2386
|
}
|
|
2382
|
-
return ""
|
|
2387
|
+
return "".concat(str4()).concat(str4(), "-").concat(str4(), "-").concat(str4(), "-").concat(str4(), "-").concat(str4()).concat(str4()).concat(str4());
|
|
2383
2388
|
}
|
|
2384
2389
|
function deepClone$2$1(target) {
|
|
2385
2390
|
function _clone(t) {
|
|
@@ -2495,7 +2500,7 @@ var iDrawCore = (function () {
|
|
|
2495
2500
|
function parseHTMLToDataURL(html, opts) {
|
|
2496
2501
|
var width = opts.width, height = opts.height;
|
|
2497
2502
|
return new Promise(function (resolve, reject) {
|
|
2498
|
-
var _svg = "\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\""
|
|
2503
|
+
var _svg = "\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"".concat(width || '', "\" height = \"").concat(height || '', "\">\n <foreignObject width=\"100%\" height=\"100%\">\n <div xmlns = \"http://www.w3.org/1999/xhtml\">\n ").concat(html, "\n </div>\n </foreignObject>\n </svg>\n ");
|
|
2499
2504
|
var blob = new Blob([_svg], { type: 'image/svg+xml;charset=utf-8' });
|
|
2500
2505
|
var reader = new FileReader();
|
|
2501
2506
|
reader.readAsDataURL(blob);
|
|
@@ -2717,11 +2722,11 @@ var iDrawCore = (function () {
|
|
|
2717
2722
|
Context.prototype.setFont = function (opts) {
|
|
2718
2723
|
var strList = [];
|
|
2719
2724
|
if (opts.fontWeight === 'bold') {
|
|
2720
|
-
strList.push(""
|
|
2725
|
+
strList.push("".concat(opts.fontWeight));
|
|
2721
2726
|
}
|
|
2722
|
-
strList.push(this._doSize(opts.fontSize || 12)
|
|
2723
|
-
strList.push(""
|
|
2724
|
-
this._ctx.font = ""
|
|
2727
|
+
strList.push("".concat(this._doSize(opts.fontSize || 12), "px"));
|
|
2728
|
+
strList.push("".concat(opts.fontFamily || 'sans-serif'));
|
|
2729
|
+
this._ctx.font = "".concat(strList.join(' '));
|
|
2725
2730
|
};
|
|
2726
2731
|
Context.prototype.setTextBaseline = function (baseline) {
|
|
2727
2732
|
this._ctx.textBaseline = baseline;
|
|
@@ -2796,16 +2801,16 @@ var iDrawCore = (function () {
|
|
|
2796
2801
|
return isColorStr$1(value);
|
|
2797
2802
|
}
|
|
2798
2803
|
function imageURL$1(value) {
|
|
2799
|
-
return (typeof value === 'string' && /^(http:\/\/|https:\/\/|\.\/|\/)/.test(""
|
|
2804
|
+
return (typeof value === 'string' && /^(http:\/\/|https:\/\/|\.\/|\/)/.test("".concat(value)));
|
|
2800
2805
|
}
|
|
2801
2806
|
function imageBase64$1(value) {
|
|
2802
|
-
return (typeof value === 'string' && /^(data:image\/)/.test(""
|
|
2807
|
+
return (typeof value === 'string' && /^(data:image\/)/.test("".concat(value)));
|
|
2803
2808
|
}
|
|
2804
2809
|
function imageSrc$1(value) {
|
|
2805
2810
|
return (imageBase64$1(value) || imageURL$1(value));
|
|
2806
2811
|
}
|
|
2807
2812
|
function svg$1(value) {
|
|
2808
|
-
return (typeof value === 'string' && /^(<svg[\s]{1,}|<svg>)/i.test(
|
|
2813
|
+
return (typeof value === 'string' && /^(<svg[\s]{1,}|<svg>)/i.test("".concat(value).trim()) && /<\/[\s]{0,}svg>$/i.test("".concat(value).trim()));
|
|
2809
2814
|
}
|
|
2810
2815
|
function html$1(value) {
|
|
2811
2816
|
var result = false;
|
|
@@ -3171,34 +3176,45 @@ var iDrawCore = (function () {
|
|
|
3171
3176
|
var fontHeight = desc.lineHeight || desc.fontSize;
|
|
3172
3177
|
var descTextList = descText.split('\n');
|
|
3173
3178
|
var lines = [];
|
|
3174
|
-
|
|
3179
|
+
var lineNum = 0;
|
|
3180
|
+
descTextList.forEach(function (tempText, idx) {
|
|
3175
3181
|
var lineText = '';
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
lines.push({
|
|
3183
|
-
text: lineText,
|
|
3184
|
-
width: ctx.calcScreenNum(ctx.measureText(lineText).width),
|
|
3185
|
-
});
|
|
3186
|
-
lineText = (tempText[i] || '');
|
|
3187
|
-
lineNum++;
|
|
3188
|
-
}
|
|
3189
|
-
if ((lineNum + 1) * fontHeight > elem.h) {
|
|
3190
|
-
break;
|
|
3191
|
-
}
|
|
3192
|
-
if (lineText && tempText.length - 1 === i) {
|
|
3193
|
-
if ((lineNum + 1) * fontHeight < elem.h) {
|
|
3182
|
+
if (tempText.length > 0) {
|
|
3183
|
+
for (var i = 0; i < tempText.length; i++) {
|
|
3184
|
+
if (ctx.measureText(lineText + (tempText[i] || '')).width < ctx.calcDeviceNum(elem.w)) {
|
|
3185
|
+
lineText += (tempText[i] || '');
|
|
3186
|
+
}
|
|
3187
|
+
else {
|
|
3194
3188
|
lines.push({
|
|
3195
3189
|
text: lineText,
|
|
3196
3190
|
width: ctx.calcScreenNum(ctx.measureText(lineText).width),
|
|
3197
3191
|
});
|
|
3192
|
+
lineText = (tempText[i] || '');
|
|
3193
|
+
lineNum++;
|
|
3194
|
+
}
|
|
3195
|
+
if ((lineNum + 1) * fontHeight > elem.h) {
|
|
3198
3196
|
break;
|
|
3199
3197
|
}
|
|
3198
|
+
if (tempText.length - 1 === i) {
|
|
3199
|
+
if ((lineNum + 1) * fontHeight < elem.h) {
|
|
3200
|
+
lines.push({
|
|
3201
|
+
text: lineText,
|
|
3202
|
+
width: ctx.calcScreenNum(ctx.measureText(lineText).width),
|
|
3203
|
+
});
|
|
3204
|
+
if (idx < descTextList.length - 1) {
|
|
3205
|
+
lineNum++;
|
|
3206
|
+
}
|
|
3207
|
+
break;
|
|
3208
|
+
}
|
|
3209
|
+
}
|
|
3200
3210
|
}
|
|
3201
3211
|
}
|
|
3212
|
+
else {
|
|
3213
|
+
lines.push({
|
|
3214
|
+
text: '',
|
|
3215
|
+
width: 0,
|
|
3216
|
+
});
|
|
3217
|
+
}
|
|
3202
3218
|
});
|
|
3203
3219
|
{
|
|
3204
3220
|
var _y_1 = elem.y;
|
|
@@ -3851,16 +3867,16 @@ var iDrawCore = (function () {
|
|
|
3851
3867
|
return isColorStr(value);
|
|
3852
3868
|
}
|
|
3853
3869
|
function imageURL(value) {
|
|
3854
|
-
return (typeof value === 'string' && /^(http:\/\/|https:\/\/|\.\/|\/)/.test(""
|
|
3870
|
+
return (typeof value === 'string' && /^(http:\/\/|https:\/\/|\.\/|\/)/.test("".concat(value)));
|
|
3855
3871
|
}
|
|
3856
3872
|
function imageBase64(value) {
|
|
3857
|
-
return (typeof value === 'string' && /^(data:image\/)/.test(""
|
|
3873
|
+
return (typeof value === 'string' && /^(data:image\/)/.test("".concat(value)));
|
|
3858
3874
|
}
|
|
3859
3875
|
function imageSrc(value) {
|
|
3860
3876
|
return (imageBase64(value) || imageURL(value));
|
|
3861
3877
|
}
|
|
3862
3878
|
function svg(value) {
|
|
3863
|
-
return (typeof value === 'string' && /^(<svg[\s]{1,}|<svg>)/i.test(
|
|
3879
|
+
return (typeof value === 'string' && /^(<svg[\s]{1,}|<svg>)/i.test("".concat(value).trim()) && /<\/[\s]{0,}svg>$/i.test("".concat(value).trim()));
|
|
3864
3880
|
}
|
|
3865
3881
|
function html(value) {
|
|
3866
3882
|
var result = false;
|
|
@@ -4952,48 +4968,50 @@ var iDrawCore = (function () {
|
|
|
4952
4968
|
if (typeof elem.angle === 'number' && Math.abs(elem.angle) > limitQbliqueAngle) {
|
|
4953
4969
|
hideObliqueDirection = true;
|
|
4954
4970
|
}
|
|
4971
|
+
var controllerOffset = lineWidth;
|
|
4955
4972
|
var wrapper = {
|
|
4956
4973
|
uuid: elem.uuid,
|
|
4957
4974
|
controllerSize: controllerSize,
|
|
4975
|
+
controllerOffset: controllerOffset,
|
|
4958
4976
|
lock: ((_b = elem === null || elem === void 0 ? void 0 : elem.operation) === null || _b === void 0 ? void 0 : _b.lock) === true,
|
|
4959
4977
|
controllers: {
|
|
4960
4978
|
topLeft: {
|
|
4961
|
-
x: elem.x -
|
|
4962
|
-
y: elem.y -
|
|
4979
|
+
x: elem.x - controllerOffset - bw,
|
|
4980
|
+
y: elem.y - controllerOffset - bw,
|
|
4963
4981
|
invisible: hideObliqueDirection || ((_c = elem === null || elem === void 0 ? void 0 : elem.operation) === null || _c === void 0 ? void 0 : _c.disbaleScale) === true,
|
|
4964
4982
|
},
|
|
4965
4983
|
top: {
|
|
4966
4984
|
x: elem.x + elem.w / 2,
|
|
4967
|
-
y: elem.y -
|
|
4985
|
+
y: elem.y - controllerOffset - bw,
|
|
4968
4986
|
invisible: ((_d = elem === null || elem === void 0 ? void 0 : elem.operation) === null || _d === void 0 ? void 0 : _d.disbaleScale) === true,
|
|
4969
4987
|
},
|
|
4970
4988
|
topRight: {
|
|
4971
|
-
x: elem.x + elem.w +
|
|
4972
|
-
y: elem.y -
|
|
4989
|
+
x: elem.x + elem.w + controllerOffset + bw,
|
|
4990
|
+
y: elem.y - controllerOffset - bw,
|
|
4973
4991
|
invisible: hideObliqueDirection || ((_e = elem === null || elem === void 0 ? void 0 : elem.operation) === null || _e === void 0 ? void 0 : _e.disbaleScale) === true,
|
|
4974
4992
|
},
|
|
4975
4993
|
right: {
|
|
4976
|
-
x: elem.x + elem.w +
|
|
4994
|
+
x: elem.x + elem.w + controllerOffset + bw,
|
|
4977
4995
|
y: elem.y + elem.h / 2,
|
|
4978
4996
|
invisible: ((_f = elem === null || elem === void 0 ? void 0 : elem.operation) === null || _f === void 0 ? void 0 : _f.disbaleScale) === true
|
|
4979
4997
|
},
|
|
4980
4998
|
bottomRight: {
|
|
4981
|
-
x: elem.x + elem.w +
|
|
4982
|
-
y: elem.y + elem.h +
|
|
4999
|
+
x: elem.x + elem.w + controllerOffset + bw,
|
|
5000
|
+
y: elem.y + elem.h + controllerOffset + bw,
|
|
4983
5001
|
invisible: hideObliqueDirection || ((_g = elem === null || elem === void 0 ? void 0 : elem.operation) === null || _g === void 0 ? void 0 : _g.disbaleScale) === true,
|
|
4984
5002
|
},
|
|
4985
5003
|
bottom: {
|
|
4986
5004
|
x: elem.x + elem.w / 2,
|
|
4987
|
-
y: elem.y + elem.h +
|
|
5005
|
+
y: elem.y + elem.h + controllerOffset + bw,
|
|
4988
5006
|
invisible: ((_h = elem === null || elem === void 0 ? void 0 : elem.operation) === null || _h === void 0 ? void 0 : _h.disbaleScale) === true,
|
|
4989
5007
|
},
|
|
4990
5008
|
bottomLeft: {
|
|
4991
|
-
x: elem.x -
|
|
4992
|
-
y: elem.y + elem.h +
|
|
5009
|
+
x: elem.x - controllerOffset - bw,
|
|
5010
|
+
y: elem.y + elem.h + controllerOffset + bw,
|
|
4993
5011
|
invisible: hideObliqueDirection || ((_j = elem === null || elem === void 0 ? void 0 : elem.operation) === null || _j === void 0 ? void 0 : _j.disbaleScale) === true,
|
|
4994
5012
|
},
|
|
4995
5013
|
left: {
|
|
4996
|
-
x: elem.x -
|
|
5014
|
+
x: elem.x - controllerOffset - bw,
|
|
4997
5015
|
y: elem.y + elem.h / 2,
|
|
4998
5016
|
invisible: ((_k = elem === null || elem === void 0 ? void 0 : elem.operation) === null || _k === void 0 ? void 0 : _k.disbaleScale) === true
|
|
4999
5017
|
},
|