diff --git a/DVE/.idea/workspace.xml b/DVE/.idea/workspace.xml
index 09945c2..b9b493c 100644
--- a/DVE/.idea/workspace.xml
+++ b/DVE/.idea/workspace.xml
@@ -30,16 +30,26 @@
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
@@ -67,13 +77,13 @@
-
-
+
+
-
-
-
+
+
+
@@ -131,16 +141,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -270,7 +270,6 @@
- ,
,oad
,oa
lo
@@ -299,6 +298,7 @@
renderPatch
GobCaryon.updateGob 大于最大选中限制时,忽略
nowSwitching
+ 强制刷新
up
@@ -329,7 +329,6 @@
-
@@ -359,7 +358,6 @@
-
@@ -369,6 +367,8 @@
+
+
@@ -855,12 +855,12 @@
-
+
-
+
@@ -1015,13 +1015,6 @@
-
-
-
-
-
-
-
@@ -1319,26 +1312,34 @@
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
+
diff --git a/DVE/Caryon/gobCaryon.js b/DVE/Caryon/gobCaryon.js
index bb3bbb8..1792c26 100644
--- a/DVE/Caryon/gobCaryon.js
+++ b/DVE/Caryon/gobCaryon.js
@@ -35,7 +35,7 @@ var GobCaryon = function () {
this.selectUpdateing = false;
this.disableRender = false //不渲染
this.disableAttrPanel = false //AttrPanel 关闭了,不需要更新
- this.updateTimestamp = ""
+ this.updateTimestamp = null
this.nowSwitching = false;//是否在切换选中图层中
@@ -1026,7 +1026,7 @@ GobCaryon.prototype._getData = function (names) {
/**
* 更新选中图层。会触发 GobCaryon.updateGob() 。
*/
-GobCaryon.prototype.updateSelect = _.debounce(async function () {
+GobCaryon.prototype.updateSelect = async function () {
if (this.disableSelectEvent)// 如果设置了停止选择更新开关则返回
@@ -1127,7 +1127,7 @@ GobCaryon.prototype.updateSelect = _.debounce(async function () {
console.log("selectUpdateing:false")
console.groupEnd()
logger.log("%c【结束】选中图层周期 -------------------- ", "color:#999;")
-}, 500)
+}
/*------------------------------------------------------------------*/
@@ -1323,7 +1323,14 @@ GobCaryon.prototype._setTypeColor = function (typeColor, color) {
* @param disableRender 禁止 Gob 更新期间渲染图层
* @returns {Promise.}
*/
-GobCaryon.prototype.updateGob = _.debounce(async function (disableRender) {
+GobCaryon.prototype.updateGob = async function (disableRender) {
+
+
+ if (this.updateTimestamp != undefined)
+ {
+ console.info("updateGob updateTimestamp 未跳出")
+ return
+ }
var self = this;
var onceUpdateTimestamp = (new Date()).getTime().toString(36)
@@ -1417,8 +1424,8 @@ GobCaryon.prototype.updateGob = _.debounce(async function (disableRender) {
} else/*大于最大选中限制时,忽略*/
{
console.log("GobCaryon.updateGob 大于最大选中限制时,忽略")
- _setObejctAll(temp, Gob.MULT)
Gob.position.$anchor = setSystem.gob.$anchor;
+ _setObejctAll(temp, Gob.MULT)
function _setObejctAll(object, value)
{
@@ -1439,6 +1446,8 @@ GobCaryon.prototype.updateGob = _.debounce(async function (disableRender) {
}
}
+ await sleep(1000)
+
}
}
@@ -1495,50 +1504,24 @@ GobCaryon.prototype.updateGob = _.debounce(async function (disableRender) {
console.timeEnd("属性赋值到 Gob 耗时:")
console.groupEnd()
- sleep(50)
-
- setTimeout(function () {
-
- if (self.updateTimestamp == onceUpdateTimestamp)
- {
- self.disableRender = false;//恢复默认值;
- self._neverUpdate = false //未更新过 = false
- self.nowSwitching = false
- console.log("【this.nowSwitching = false】", onceUpdateTimestamp)
- }
-
- }, 300)
-
-
- // this.nowSwitching = false;
- // this._asyncSetSwitch = false;
-
- // //----------------更新图层后渲染
- // console.log("this.selectRender:", this.selectRender, " varSystem.autoRender", setSystem.autoRender, " selectChanged:", this.selectChanged,
- // " renderCaryon.status.rendering:", renderCaryon.status.rendering,
- // )
- // console.log("this.selectRenderVarList:", this.selectRenderVarList)
- //
- //
- // if (this.selectRender && setSystem.autoRender && !this.selectChanged && !renderCaryon.status.rendering)
- // {
- // if (this.selectRenderVarList != undefined && this.selectRenderVarList.length > 0)
- // {
- // console.log("更新图层后渲染")
- // // renderCaryon.renderDocument(true, this.selectRenderVarList)
- // }
- // }
- console.groupEnd();
+ await sleep(500)
+ if (self.updateTimestamp == onceUpdateTimestamp)
+ {
+ self.disableRender = false;//恢复默认值;
+ self._neverUpdate = false //未更新过 = false
+ self.nowSwitching = false
+ console.log("【this.nowSwitching = false】", onceUpdateTimestamp)
+ this.updateTimestamp = null
+ }
if (this._unripe)
{
- setTimeout(function () {
- self._unripe = false;
- logger.info("[准备完成] _unripe")
- }, 500)
-
+ self._unripe = false;
+ logger.info("[准备完成] _unripe")
}
+
+ console.groupEnd();
console.timeEnd("updateGob 耗时")
logger.groupEnd()
@@ -1719,7 +1702,7 @@ GobCaryon.prototype.updateGob = _.debounce(async function (disableRender) {
}
-}, 300)
+}
function _objectToObject(object, sameObject, checkMUTI, ignoreNull, asyncCounter)
diff --git a/DVE/bin/JS/main.js b/DVE/bin/JS/main.js
index 3e458db..3513cac 100644
--- a/DVE/bin/JS/main.js
+++ b/DVE/bin/JS/main.js
@@ -10049,6 +10049,7 @@ window.svgoAsync = function () {
}();
+
var logger = new __WEBPACK_IMPORTED_MODULE_10__Caryon_loggerCaryon_js__["a" /* default */]();
window.logger = logger;
@@ -10059,63 +10060,78 @@ logger.info("3,2,1 " + "%c" + UIDNA.name + " v" + UIDNA.version + " -" + UIDNA.c
+
var IchiColor = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__Caryon_IchiColor_ichi_color_extension__["default"])(__WEBPACK_IMPORTED_MODULE_11__Caryon_IchiColor_ichi_color_js__["default"]);
window.IchiColor = IchiColor;
window.ichiColor = new IchiColor();
+
window.ColorRNA = __WEBPACK_IMPORTED_MODULE_13__Caryon_IchiColor_lib_ColorRNA_js__["default"];
+
var setSystem = new __WEBPACK_IMPORTED_MODULE_14__Caryon_settingCaryon__["a" /* default */]();
window.setSystem = setSystem;
+
if (typeof window.__adobe_cep__ !== "undefined") {
var enzymes = new __WEBPACK_IMPORTED_MODULE_15__Enzymes_Enzymes__["a" /* default */]();
window.enzymes = enzymes;
}
+
var renderCaryon = new __WEBPACK_IMPORTED_MODULE_16__Caryon_renderCaryon__["a" /* default */]();
window.renderCaryon = renderCaryon;
+
var dataCaryon = new __WEBPACK_IMPORTED_MODULE_17__Caryon_dataCaryon__["a" /* default */]();
window.dataCaryon = dataCaryon;
+
var varSystem = new __WEBPACK_IMPORTED_MODULE_18__Caryon_varSystem__["a" /* default */]();
window.varSystem = varSystem;
+
var test = new __WEBPACK_IMPORTED_MODULE_19__test_test_core__["a" /* default */]("默认测试");
window.test = test;
+
var Gob = new __WEBPACK_IMPORTED_MODULE_20__Caryon_gobCaryon__["a" /* default */]("默认测试");
window.Gob = Gob;
+
var appCaryon = new __WEBPACK_IMPORTED_MODULE_21__Caryon_appCaryon__["a" /* default */]();
window.appCaryon = appCaryon;
+
window.netCaryon = new __WEBPACK_IMPORTED_MODULE_22__Caryon_netCaryon__["a" /* default */]();
+
var eventCaryon = new __WEBPACK_IMPORTED_MODULE_23__Caryon_eventCaryon__["a" /* default */]("默认测试");
window.eventCaryon = eventCaryon;
+
window.Proteins = __WEBPACK_IMPORTED_MODULE_24__Proteins_Proteins_js__["a" /* default */];
__WEBPACK_IMPORTED_MODULE_24__Proteins_Proteins_js__["a" /* default */].init();
window.tests = {};
+
window.tests.task_Enzymes = __WEBPACK_IMPORTED_MODULE_25__test_test_Enzymes_JS__["a" /* default */];
+
Vue.filter('lang', __WEBPACK_IMPORTED_MODULE_26__Caryon_lang__["a" /* default */].fiterFunc);
__WEBPACK_IMPORTED_MODULE_26__Caryon_lang__["a" /* default */].currentLANG = __WEBPACK_IMPORTED_MODULE_26__Caryon_lang__["a" /* default */].LANG_Chiness2English;
window.Lang = __WEBPACK_IMPORTED_MODULE_26__Caryon_lang__["a" /* default */];
@@ -10124,6 +10140,7 @@ Vue.config.debug = true;
Vue.config.devtools = false;
+
window.UI_model = __WEBPACK_IMPORTED_MODULE_27__components_UI_model_UI_model_js__["a" /* UI_model */];
window.UI_action = __WEBPACK_IMPORTED_MODULE_27__components_UI_model_UI_model_js__["b" /* UI_action */];
@@ -10200,6 +10217,32 @@ window.sleep = function () {
};
}();
+window.sleepTask = function () {
+ var _ref5 = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_asyncToGenerator___default()(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_regenerator___default.a.mark(function _callee5(ms) {
+ return __WEBPACK_IMPORTED_MODULE_1_babel_runtime_regenerator___default.a.wrap(function _callee5$(_context5) {
+ while (1) {
+ switch (_context5.prev = _context5.next) {
+ case 0:
+
+ console.log("等待", ms, "ms");
+ _context5.next = 3;
+ return sleep(ms);
+
+ case 3:
+ console.log("等待完了", ms, "ms");
+
+ case 4:
+ case "end":
+ return _context5.stop();
+ }
+ }
+ }, _callee5, this);
+ }));
+
+ return function (_x3) {
+ return _ref5.apply(this, arguments);
+ };
+}();
var __result = asyncTask();
console.log("sss_end" + __result);
@@ -11648,7 +11691,7 @@ var GobCaryon = function GobCaryon() {
this.selectUpdateing = false;
this.disableRender = false;
this.disableAttrPanel = false;
- this.updateTimestamp = "";
+ this.updateTimestamp = null;
this.nowSwitching = false;
this.stopSelectEvent = false;
@@ -12495,7 +12538,7 @@ GobCaryon.prototype._getData = function (names) {
return _valueFromObject(this, names, 0, true);
};
-GobCaryon.prototype.updateSelect = _.debounce(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_asyncToGenerator___default()(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_regenerator___default.a.mark(function _callee2() {
+GobCaryon.prototype.updateSelect = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_asyncToGenerator___default()(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_regenerator___default.a.mark(function _callee2() {
var self, newList, x, i;
return __WEBPACK_IMPORTED_MODULE_1_babel_runtime_regenerator___default.a.wrap(function _callee2$(_context2) {
while (1) {
@@ -12626,7 +12669,7 @@ GobCaryon.prototype.updateSelect = _.debounce(__WEBPACK_IMPORTED_MODULE_2_babel_
}
}
}, _callee2, this, [[20, 41], [30, 36]]);
-})), 500);
+}));
GobCaryon.prototype.getLayerInfoObejct_position = function () {
var _ref3 = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_asyncToGenerator___default()(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_regenerator___default.a.mark(function _callee3(layerId) {
@@ -12945,7 +12988,7 @@ GobCaryon.prototype._setTypeColor = function (typeColor, color) {
}
};
-GobCaryon.prototype.updateGob = _.debounce(function () {
+GobCaryon.prototype.updateGob = function () {
var _ref9 = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_asyncToGenerator___default()(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_regenerator___default.a.mark(function _callee10(disableRender) {
var _objectToGob_async = function () {
var _ref10 = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_asyncToGenerator___default()(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_regenerator___default.a.mark(function _callee9(srcObject, names, gobThis) {
@@ -13094,6 +13137,15 @@ GobCaryon.prototype.updateGob = _.debounce(function () {
}
};
+ if (!(this.updateTimestamp != undefined)) {
+ _context10.next = 7;
+ break;
+ }
+
+ console.info("updateGob updateTimestamp 未跳出");
+ return _context10.abrupt("return");
+
+ case 7:
self = this;
onceUpdateTimestamp = new Date().getTime().toString(36);
@@ -13121,31 +13173,31 @@ GobCaryon.prototype.updateGob = _.debounce(function () {
console.timeEnd("updateGob前期准备耗时");
console.time("拉取每个选中图层的数据");
- _context10.prev = 27;
+ _context10.prev = 30;
if (!(this.selectList.length > 0)) {
- _context10.next = 83;
+ _context10.next = 88;
break;
}
if (!(this.selectList.length < setSystem.inset.selectMax)) {
- _context10.next = 79;
+ _context10.next = 82;
break;
}
i = 0;
- case 31:
+ case 34:
if (!(i < this.selectList.length)) {
- _context10.next = 77;
+ _context10.next = 80;
break;
}
console.time("position获取耗时");
- _context10.next = 35;
+ _context10.next = 38;
return this.getLayerInfoObejct_position(this.selectList[i].id);
- case 35:
+ case 38:
item_position = _context10.sent;
_fromDataCaryon(dataCaryon.layers[this.selectList[i].id], item_position, "position");
@@ -13153,10 +13205,10 @@ GobCaryon.prototype.updateGob = _.debounce(function () {
console.timeEnd("position获取耗时");
console.time("text获取耗时");
- _context10.next = 42;
+ _context10.next = 45;
return this.getLayerInfoObejct_text(this.selectList[i].id);
- case 42:
+ case 45:
item_text = _context10.sent;
_fromDataCaryon(dataCaryon.layers[this.selectList[i].id], item_text, "text");
@@ -13164,10 +13216,10 @@ GobCaryon.prototype.updateGob = _.debounce(function () {
console.timeEnd("text获取耗时");
console.time("shape获取耗时");
- _context10.next = 49;
+ _context10.next = 52;
return this.getLayerInfoObejct_shape(this.selectList[i].id);
- case 49:
+ case 52:
item_shape = _context10.sent;
_fromDataCaryon(dataCaryon.layers[this.selectList[i].id], item_shape, "shape");
@@ -13175,10 +13227,10 @@ GobCaryon.prototype.updateGob = _.debounce(function () {
console.timeEnd("shape获取耗时");
console.time("smartObject获取耗时");
- _context10.next = 56;
+ _context10.next = 59;
return this.getLayerInfoObejct_smartObject(this.selectList[i].id);
- case 56:
+ case 59:
item_smartObject = _context10.sent;
_fromDataCaryon(dataCaryon.layers[this.selectList[i].id], item_smartObject, "smartObject");
@@ -13186,10 +13238,10 @@ GobCaryon.prototype.updateGob = _.debounce(function () {
console.timeEnd("smartObject获取耗时");
console.time("quickEffect获取耗时");
- _context10.next = 63;
+ _context10.next = 66;
return this.getLayerInfoObejct_quickEffect(this.selectList[i].id);
- case 63:
+ case 66:
item_quickEffect = _context10.sent;
_fromDataCaryon(dataCaryon.layers[this.selectList[i].id], item_quickEffect, "quickEffect");
@@ -13197,26 +13249,26 @@ GobCaryon.prototype.updateGob = _.debounce(function () {
console.timeEnd("quickEffect获取耗时");
console.time("more获取耗时");
- _context10.next = 70;
+ _context10.next = 73;
return this.getLayerInfoObejct_more(this.selectList[i].id);
- case 70:
+ case 73:
item_more = _context10.sent;
_fromDataCaryon(dataCaryon.layers[this.selectList[i].id], item_more, "more");
_objectToObject(item_more, temp.more, true, !(i == 0));
console.timeEnd("more获取耗时");
- case 74:
+ case 77:
i++;
- _context10.next = 31;
+ _context10.next = 34;
break;
- case 77:
- _context10.next = 83;
+ case 80:
+ _context10.next = 88;
break;
- case 79:
+ case 82:
_setObejctAll2 = function _setObejctAll2(object, value) {
for (var v in object) {
@@ -13231,98 +13283,100 @@ GobCaryon.prototype.updateGob = _.debounce(function () {
};
console.log("GobCaryon.updateGob 大于最大选中限制时,忽略");
- _setObejctAll2(temp, Gob.MULT);
Gob.position.$anchor = setSystem.gob.$anchor;
+ _setObejctAll2(temp, Gob.MULT);
- case 83:
_context10.next = 88;
+ return sleep(1000);
+
+ case 88:
+ _context10.next = 93;
break;
- case 85:
- _context10.prev = 85;
- _context10.t0 = _context10["catch"](27);
+ case 90:
+ _context10.prev = 90;
+ _context10.t0 = _context10["catch"](30);
console.error("GobCaryon.updateGob 拉取每个选中图层的数据", _context10.t0);
- case 88:
+ case 93:
console.timeEnd("拉取每个选中图层的数据");
console.group("属性赋值到 Gob");
console.time("属性赋值到 Gob 耗时:");
- _context10.prev = 91;
- _context10.next = 94;
+ _context10.prev = 96;
+ _context10.next = 99;
return _objectToGob_async(temp.position, ["position"], this);
- case 94:
- _context10.next = 96;
+ case 99:
+ _context10.next = 101;
return _objectToGob_async(temp.text, ["text"], this);
- case 96:
- _context10.next = 98;
+ case 101:
+ _context10.next = 103;
return _objectToGob_async(temp.shape, ["shape"], this);
- case 98:
- _context10.next = 100;
+ case 103:
+ _context10.next = 105;
return _objectToGob_async(temp.smartObject, ["smartObject"], this);
- case 100:
- _context10.next = 102;
+ case 105:
+ _context10.next = 107;
return _objectToGob_async(temp.quickEffect, ["quickEffect"], this);
- case 102:
- _context10.next = 104;
+ case 107:
+ _context10.next = 109;
return _objectToGob_async(temp.more, ["more"], this);
- case 104:
- _context10.next = 109;
+ case 109:
+ _context10.next = 114;
break;
- case 106:
- _context10.prev = 106;
- _context10.t1 = _context10["catch"](91);
+ case 111:
+ _context10.prev = 111;
+ _context10.t1 = _context10["catch"](96);
console.error("GobCaryon.updateGob _objectToGob_async", _context10.t1);
- case 109:
+ case 114:
console.timeEnd("属性赋值到 Gob 耗时:");
console.groupEnd();
- sleep(50);
-
- setTimeout(function () {
+ _context10.next = 118;
+ return sleep(500);
- if (self.updateTimestamp == onceUpdateTimestamp) {
- self.disableRender = false;
- self._neverUpdate = false;
- self.nowSwitching = false;
- console.log("【this.nowSwitching = false】", onceUpdateTimestamp);
- }
- }, 300);
+ case 118:
- console.groupEnd();
+ if (self.updateTimestamp == onceUpdateTimestamp) {
+ self.disableRender = false;
+ self._neverUpdate = false;
+ self.nowSwitching = false;
+ console.log("【this.nowSwitching = false】", onceUpdateTimestamp);
+ this.updateTimestamp = null;
+ }
if (this._unripe) {
- setTimeout(function () {
- self._unripe = false;
- logger.info("[准备完成] _unripe");
- }, 500);
+ self._unripe = false;
+ logger.info("[准备完成] _unripe");
}
+
+ console.groupEnd();
console.timeEnd("updateGob 耗时");
logger.groupEnd();
- case 117:
+ case 123:
case "end":
return _context10.stop();
}
}
- }, _callee10, this, [[27, 85], [91, 106]]);
+ }, _callee10, this, [[30, 90], [96, 111]]);
}));
return function (_x11) {
return _ref9.apply(this, arguments);
};
-}(), 300);
+}();
function _objectToObject(object, sameObject, checkMUTI, ignoreNull, asyncCounter) {
@@ -19407,7 +19461,9 @@ exports.default = {
Gob.disableSelectEvent = false;
Gob.selectUpdateing = false;
+ Gob.updateTimestamp = null;
Gob.updateSelect();
+
setTimeout(function () {
self.nowFreshen = false;
}, 800);
diff --git a/DVE/components/AttributePanel_optionMenu.vue b/DVE/components/AttributePanel_optionMenu.vue
index d87319b..008785e 100644
--- a/DVE/components/AttributePanel_optionMenu.vue
+++ b/DVE/components/AttributePanel_optionMenu.vue
@@ -299,7 +299,9 @@
Gob.disableSelectEvent =false;
Gob.selectUpdateing = false;
+ Gob.updateTimestamp =null
Gob.updateSelect()
+
setTimeout(function ()
{
self.nowFreshen = false
diff --git a/DVE/index.js b/DVE/index.js
index 4c8abce..ebe9d6c 100644
--- a/DVE/index.js
+++ b/DVE/index.js
@@ -3,8 +3,6 @@
*/
-
-
// import Vue from "vue";
import App from "./components/area.vue";
// import vi from "./components/AttributePanel_valueInput.vue";
@@ -96,17 +94,16 @@ window.FIL = FIL
// 异步封装-------------------------------------
-window.svgoAsync = async function (svg)
-{
- return new Promise(function (resolve, reject)
- {
+window.svgoAsync = async function (svg) {
+ return new Promise(function (resolve, reject) {
window.svgo.optimize(svg, (r) => {resolve(r)})
})
}
//日志记录系统 -------------------------------------
-import LoggerCaryon from "./Caryon/loggerCaryon.js";
+import LoggerCaryon from "./Caryon/loggerCaryon.js";
+
var logger = new LoggerCaryon();
window.logger = logger;
@@ -123,24 +120,28 @@ logger.info(
//数据结构--------------------------------------------
-import IchiColor_base from "./Caryon/IchiColor/ichi-color.js";
-import IchiColor_ex from "./Caryon/IchiColor/ichi-color-extension";
+import IchiColor_base from "./Caryon/IchiColor/ichi-color.js";
+import IchiColor_ex from "./Caryon/IchiColor/ichi-color-extension";
+
var IchiColor = IchiColor_ex(IchiColor_base);
window.IchiColor = IchiColor;
window.ichiColor = new IchiColor();
-import ColorRNA from "./Caryon/IchiColor/lib/ColorRNA.js";
+import ColorRNA from "./Caryon/IchiColor/lib/ColorRNA.js";
+
window.ColorRNA = ColorRNA;
//设置系统-------------------------------------
-import SetSystem from "./Caryon/settingCaryon";
+import SetSystem from "./Caryon/settingCaryon";
+
var setSystem = new SetSystem();
window.setSystem = setSystem;
//PhotoShop 接口操作库-------------------------------------
-import Enzymes from "./Enzymes/Enzymes";
+import Enzymes from "./Enzymes/Enzymes";
+
if (typeof window.__adobe_cep__ !== "undefined")
{
var enzymes = new Enzymes();
@@ -148,55 +149,66 @@ if (typeof window.__adobe_cep__ !== "undefined")
}
//渲染系统-------------------------------------
-import RenderCaryon from "./Caryon/renderCaryon";
+import RenderCaryon from "./Caryon/renderCaryon";
+
var renderCaryon = new RenderCaryon();
window.renderCaryon = renderCaryon;
//数据存储系统-------------------------------------
-import DataCaryon from "./Caryon/dataCaryon";
+import DataCaryon from "./Caryon/dataCaryon";
+
var dataCaryon = new DataCaryon();
window.dataCaryon = dataCaryon;
// 变量系统-------------------------------------
-import VarSystem from "./Caryon/varSystem";
+import VarSystem from "./Caryon/varSystem";
+
var varSystem = new VarSystem();
window.varSystem = varSystem;
//测试系统-------------------------------------
-import TEST from "./test/test_core";
+import TEST from "./test/test_core";
+
var test = new TEST("默认测试");
window.test = test
//选中图层处理-------------------------------------
-import GobCaryon from "./Caryon/gobCaryon";
+import GobCaryon from "./Caryon/gobCaryon";
+
var Gob = new GobCaryon("默认测试");
window.Gob = Gob
//应用功能-------------------------------------
-import AppCaryon from "./Caryon/appCaryon";
+import AppCaryon from "./Caryon/appCaryon";
+
var appCaryon = new AppCaryon();
window.appCaryon = appCaryon
//网络通信相关-------------------------------------
-import NetCaryon from "./Caryon/netCaryon";
+import NetCaryon from "./Caryon/netCaryon";
+
window.netCaryon = new NetCaryon()
//Photoshop 事件相关-------------------------------------
-import EventCaryon from "./Caryon/eventCaryon";
+import EventCaryon from "./Caryon/eventCaryon";
+
var eventCaryon = new EventCaryon("默认测试");
window.eventCaryon = eventCaryon
//脚本功能库相关-------------------------------------
-import Proteins from "./Proteins/Proteins.js";
+import Proteins from "./Proteins/Proteins.js";
+
window.Proteins = Proteins
Proteins.init();
//测试相关 -----------------------------------
window.tests = {};
-import test_task_Enzymes from "./test/test_Enzymes_JS";
+import test_task_Enzymes from "./test/test_Enzymes_JS";
+
window.tests.task_Enzymes = test_task_Enzymes;
//多国语相关 -----------------------
-import Lang from "./Caryon/lang";
+import Lang from "./Caryon/lang";
+
Vue.filter('lang', Lang.fiterFunc);
Lang.currentLANG = Lang.LANG_Chiness2English;
window.Lang = Lang;
@@ -207,6 +219,7 @@ Vue.config.debug = true;//开启错误提示
Vue.config.devtools = false;
import {UI_model, UI_action} from "./components/UI_model/UI_model.js"
+
window.UI_model = UI_model;
window.UI_action = UI_action;
@@ -216,9 +229,9 @@ window.UI_action = UI_action;
import AttrPanel from "./components/AttributePanel.vue";
import LayerSelectors from "./components/LayerSelectors.vue";
import VarPanel from "./components/VarPanel.vue";
-import ExpressionPanel from "./components/ExpressionPanel.vue"
-import QuickPanel from "./components/QuickPanel.vue"
-import SettingPanel from "./components/SettingPanel.vue"
+import ExpressionPanel from "./components/ExpressionPanel.vue"
+import QuickPanel from "./components/QuickPanel.vue"
+import SettingPanel from "./components/SettingPanel.vue"
//初始化-------------------------------------------
@@ -234,8 +247,7 @@ if (fs.existsSync(path.join(setSystem._path_appDir, "UI-DNA.json")))
fs.writeFileSync(path.join(setSystem._path_appDir, "UI-DNA.json"), JSON.stringify(UIDNA, null, 4))
appCaryon.unzipInstallExtra()
}
-setTimeout(function ()
-{
+setTimeout(function () {
setSystem.load()
setSystem.loadLanguage()
Lang.currentLANG = setSystem.ui.language
@@ -249,10 +261,8 @@ setTimeout(function ()
var mainVue = new Vue({
el: 'body',
data: {setSystem: setSystem},
- ready: function ()
- {
- setTimeout(function ()
- {
+ ready: function () {
+ setTimeout(function () {
setSystem.loadAppState()
}, 300)
@@ -286,26 +296,22 @@ if (os.platform() == "darwin")
//测试 ----------------------
async function doAsync()
{
- return new Promise(function (resolve, reject)
- {
- setTimeout(() =>
- {
+ return new Promise(function (resolve, reject) {
+ setTimeout(() => {
console.log("sleep 2s");
resolve(444)
}, 2000)
})
}
-window.sleep = async function (ms)
-{
- return new Promise(function (resolve, reject)
- {
- setTimeout(() =>
- {
+window.sleep = async function (ms) {
+ return new Promise(function (resolve, reject) {
+ setTimeout(() => {
resolve()
}, ms)
})
}
+
async function asyncTask()
{
@@ -315,6 +321,12 @@ async function asyncTask()
return 2016
}
+window.sleepTask = async function (ms) {
+
+ console.log("等待",ms,"ms")
+ await sleep(ms)
+ console.log("等待完了",ms,"ms")
+}
var __result = asyncTask()
console.log("sss_end" + __result)