mce 0.15.11 → 0.15.13
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.js
CHANGED
|
@@ -892,6 +892,7 @@ const _0_context = defineMixin((editor) => {
|
|
|
892
892
|
const drawboardPointer = ref();
|
|
893
893
|
const drawboardContextMenuPointer = ref();
|
|
894
894
|
const doc = ref(new Doc());
|
|
895
|
+
const docLoading = ref(false);
|
|
895
896
|
const root = computed(() => doc.value.root);
|
|
896
897
|
const nodes = ref([]);
|
|
897
898
|
const nodeIndexMap = reactive(/* @__PURE__ */ new Map());
|
|
@@ -965,6 +966,7 @@ const _0_context = defineMixin((editor) => {
|
|
|
965
966
|
camera,
|
|
966
967
|
drawboardEffect,
|
|
967
968
|
doc,
|
|
969
|
+
docLoading,
|
|
968
970
|
root,
|
|
969
971
|
nodes,
|
|
970
972
|
nodeIndexMap,
|
|
@@ -2851,6 +2853,7 @@ const _4_3_element = defineMixin((editor) => {
|
|
|
2851
2853
|
const _4_4_doc = defineMixin((editor, options) => {
|
|
2852
2854
|
const {
|
|
2853
2855
|
doc,
|
|
2856
|
+
docLoading,
|
|
2854
2857
|
renderEngine,
|
|
2855
2858
|
emit,
|
|
2856
2859
|
selection,
|
|
@@ -2922,13 +2925,16 @@ const _4_4_doc = defineMixin((editor, options) => {
|
|
|
2922
2925
|
return _doc;
|
|
2923
2926
|
};
|
|
2924
2927
|
const loadDoc = async (source) => {
|
|
2928
|
+
docLoading.value = true;
|
|
2925
2929
|
emit("docLoading", source);
|
|
2926
2930
|
try {
|
|
2927
2931
|
const _doc = await setDoc(await load(source));
|
|
2928
2932
|
emit("docLoaded", source, _doc);
|
|
2933
|
+
docLoading.value = false;
|
|
2929
2934
|
return _doc;
|
|
2930
2935
|
} catch (err) {
|
|
2931
2936
|
emit("docLoaded", source, err);
|
|
2937
|
+
docLoading.value = false;
|
|
2932
2938
|
throw err;
|
|
2933
2939
|
}
|
|
2934
2940
|
};
|
|
@@ -5179,7 +5185,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
5179
5185
|
if (node.foreground.isValid() && node.foreground.image) {
|
|
5180
5186
|
value = t("image");
|
|
5181
5187
|
} else if (node.text.isValid()) {
|
|
5182
|
-
value = node.text.
|
|
5188
|
+
value = node.text.textContent;
|
|
5183
5189
|
}
|
|
5184
5190
|
}
|
|
5185
5191
|
}
|
|
@@ -10506,7 +10512,7 @@ const _rotate = definePlugin((editor) => {
|
|
|
10506
10512
|
} = editor;
|
|
10507
10513
|
function rotate(deg) {
|
|
10508
10514
|
elementSelection.value.forEach((el) => {
|
|
10509
|
-
el.style.rotate
|
|
10515
|
+
el.style.rotate = (el.style.rotate + deg) % 360;
|
|
10510
10516
|
});
|
|
10511
10517
|
}
|
|
10512
10518
|
return {
|
|
@@ -15271,7 +15277,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
15271
15277
|
hovered = result;
|
|
15272
15278
|
}
|
|
15273
15279
|
}
|
|
15274
|
-
if (!(isElement(hovered) && !isTopLevelFrame(hovered))) {
|
|
15280
|
+
if (!(isElement(hovered) && !isLock(hovered) && !isTopLevelFrame(hovered))) {
|
|
15275
15281
|
hovered = void 0;
|
|
15276
15282
|
cursor = void 0;
|
|
15277
15283
|
}
|
|
@@ -15286,7 +15292,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
15286
15292
|
allowRootFrame = false
|
|
15287
15293
|
} = options;
|
|
15288
15294
|
function isIncluded(node) {
|
|
15289
|
-
return isElement(node) && (allowRootFrame || !isTopLevelFrame(node));
|
|
15295
|
+
return isElement(node) && !isLock(node) && (allowRootFrame || !isTopLevelFrame(node));
|
|
15290
15296
|
}
|
|
15291
15297
|
const drawing = state.value === "drawing";
|
|
15292
15298
|
const hand = state.value === "hand";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.15.
|
|
4
|
+
"version": "0.15.13",
|
|
5
5
|
"description": "The headless canvas editor framework. only the ESM.",
|
|
6
6
|
"author": "wxm",
|
|
7
7
|
"license": "MIT",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"diff": "^8.0.2",
|
|
62
62
|
"file-saver": "^2.0.5",
|
|
63
63
|
"lodash-es": "^4.17.22",
|
|
64
|
-
"modern-canvas": "^0.14.
|
|
64
|
+
"modern-canvas": "^0.14.28",
|
|
65
65
|
"modern-font": "^0.4.4",
|
|
66
66
|
"modern-idoc": "^0.10.8",
|
|
67
67
|
"modern-text": "^1.10.7",
|