@hufe921/canvas-editor 0.9.51 → 0.9.52
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/CHANGELOG.md +16 -0
- package/dist/canvas-editor.es.js +14 -8
- package/dist/canvas-editor.es.js.map +1 -1
- package/dist/canvas-editor.umd.js +9 -9
- package/dist/canvas-editor.umd.js.map +1 -1
- package/dist/src/editor/core/command/Command.d.ts +1 -0
- package/dist/src/editor/core/command/CommandAdapt.d.ts +1 -0
- package/dist/src/editor/interface/Control.d.ts +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [0.9.52](https://github.com/Hufe921/canvas-editor/compare/v0.9.51...v0.9.52) (2023-10-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* bounding rect error in getRangeContext api ([06c3a33](https://github.com/Hufe921/canvas-editor/commit/06c3a337aeb1eccf6e7182040e6db1acadc9aee9))
|
|
7
|
+
* set range style when on double click ([6f2fb5d](https://github.com/Hufe921/canvas-editor/commit/6f2fb5de0971fc98a585283f5676aed4dcdae1cc))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* add extend attribute to control element #293 ([0395a72](https://github.com/Hufe921/canvas-editor/commit/0395a72fe6464a78883630abac659aafac11d723)), closes [#293](https://github.com/Hufe921/canvas-editor/issues/293)
|
|
13
|
+
* add getContainer api ([c944872](https://github.com/Hufe921/canvas-editor/commit/c944872ae7ccc273508884f103ca0fe1711c5d2c))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
1
17
|
## [0.9.51](https://github.com/Hufe921/canvas-editor/compare/v0.9.50...v0.9.51) (2023-10-10)
|
|
2
18
|
|
|
3
19
|
|
package/dist/canvas-editor.es.js
CHANGED
|
@@ -23,7 +23,7 @@ var __publicField = (obj, key, value) => {
|
|
|
23
23
|
return value;
|
|
24
24
|
};
|
|
25
25
|
var index = "";
|
|
26
|
-
const version = "0.9.
|
|
26
|
+
const version = "0.9.52";
|
|
27
27
|
var MaxHeightRatio;
|
|
28
28
|
(function(MaxHeightRatio2) {
|
|
29
29
|
MaxHeightRatio2["HALF"] = "half";
|
|
@@ -5845,6 +5845,7 @@ function dblclick(host, evt) {
|
|
|
5845
5845
|
isSetCursor: false,
|
|
5846
5846
|
isCompute: false
|
|
5847
5847
|
});
|
|
5848
|
+
rangeManager.setRangeStyle();
|
|
5848
5849
|
}
|
|
5849
5850
|
function threeClick(host) {
|
|
5850
5851
|
const draw = host.getDraw();
|
|
@@ -9347,19 +9348,19 @@ class Control {
|
|
|
9347
9348
|
j++;
|
|
9348
9349
|
}
|
|
9349
9350
|
if (type === ControlType.TEXT) {
|
|
9350
|
-
result.push({
|
|
9351
|
+
result.push(__spreadProps(__spreadValues({}, element.control), {
|
|
9351
9352
|
value: textControlValue || null,
|
|
9352
9353
|
innerText: textControlValue || null
|
|
9353
|
-
});
|
|
9354
|
+
}));
|
|
9354
9355
|
} else if (type === ControlType.SELECT || type === ControlType.CHECKBOX) {
|
|
9355
9356
|
const innerText = code == null ? void 0 : code.split(",").map((selectCode) => {
|
|
9356
9357
|
var _a2;
|
|
9357
9358
|
return (_a2 = valueSets == null ? void 0 : valueSets.find((valueSet) => valueSet.code === selectCode)) == null ? void 0 : _a2.value;
|
|
9358
9359
|
}).filter(Boolean).join("");
|
|
9359
|
-
result.push({
|
|
9360
|
+
result.push(__spreadProps(__spreadValues({}, element.control), {
|
|
9360
9361
|
value: code || null,
|
|
9361
9362
|
innerText: innerText || null
|
|
9362
|
-
});
|
|
9363
|
+
}));
|
|
9363
9364
|
}
|
|
9364
9365
|
i = j;
|
|
9365
9366
|
}
|
|
@@ -12913,6 +12914,7 @@ class Command {
|
|
|
12913
12914
|
__publicField(this, "getLocale");
|
|
12914
12915
|
__publicField(this, "getGroupIds");
|
|
12915
12916
|
__publicField(this, "getControlValue");
|
|
12917
|
+
__publicField(this, "getContainer");
|
|
12916
12918
|
this.executeMode = adapt.mode.bind(adapt);
|
|
12917
12919
|
this.executeCut = adapt.cut.bind(adapt);
|
|
12918
12920
|
this.executeCopy = adapt.copy.bind(adapt);
|
|
@@ -13008,6 +13010,7 @@ class Command {
|
|
|
13008
13010
|
this.getSearchNavigateInfo = adapt.getSearchNavigateInfo.bind(adapt);
|
|
13009
13011
|
this.getLocale = adapt.getLocale.bind(adapt);
|
|
13010
13012
|
this.getGroupIds = adapt.getGroupIds.bind(adapt);
|
|
13013
|
+
this.getContainer = adapt.getContainer.bind(adapt);
|
|
13011
13014
|
this.executeSetControlValue = adapt.setControlValue.bind(adapt);
|
|
13012
13015
|
this.getControlValue = adapt.getControlValue.bind(adapt);
|
|
13013
13016
|
}
|
|
@@ -14697,9 +14700,9 @@ class CommandAdapt {
|
|
|
14697
14700
|
currentX = leftTop[0];
|
|
14698
14701
|
} else {
|
|
14699
14702
|
rangeRect.width = rightTop[0] - currentX;
|
|
14700
|
-
|
|
14701
|
-
|
|
14702
|
-
|
|
14703
|
+
}
|
|
14704
|
+
if (p === selectionPositionList.length - 1 && rangeRect) {
|
|
14705
|
+
rangeRects.push(rangeRect);
|
|
14703
14706
|
}
|
|
14704
14707
|
}
|
|
14705
14708
|
}
|
|
@@ -14905,6 +14908,9 @@ class CommandAdapt {
|
|
|
14905
14908
|
return;
|
|
14906
14909
|
this.draw.getControl().setValueByConceptId(payload);
|
|
14907
14910
|
}
|
|
14911
|
+
getContainer() {
|
|
14912
|
+
return this.draw.getContainer();
|
|
14913
|
+
}
|
|
14908
14914
|
}
|
|
14909
14915
|
class Listener {
|
|
14910
14916
|
constructor() {
|