Skip to content

Commit

Permalink
fix 使用色彩取样器的属性不可赋值到变量的 BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
nullice committed May 12, 2017
1 parent 47e6fdc commit a16e34b
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 54 deletions.
68 changes: 34 additions & 34 deletions DVE/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions DVE/Caryon/renderCaryon.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,13 @@ RenderCaryon.prototype.renderDocument = async function (varUpdateMode, varUpdate
if (enable)
{
var dataCaryonValue = OBJ.getObjectValueByNames(layer[rootName], names);
if (TYP.type(dataCaryonValue) === "object")// 处理色彩
{
if (dataCaryonValue["$hex"] != undefined && dataCaryonValue["$hex"][0] === "$")
{
dataCaryonValue = dataCaryonValue["$hex"]
}
}
console.info("dataCaryonValue", dataCaryonValue)
if (dataCaryonValue != undefined && (OBJ.isEmptyObject(dataCaryonValue) != true))
{
Expand Down
45 changes: 25 additions & 20 deletions DVE/bin/JS/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14639,28 +14639,33 @@ RenderCaryon.prototype.renderDocument = function () {
break;

case 11:
_context5.next = 33;
_context5.next = 34;
break;

case 13:
enable = __WEBPACK_IMPORTED_MODULE_7__Richang_JSEX_objectOBJ_js__["default"].getObjectValueByNames(enableAssigns, names);

if (!enable) {
_context5.next = 33;
_context5.next = 34;
break;
}

dataCaryonValue = __WEBPACK_IMPORTED_MODULE_7__Richang_JSEX_objectOBJ_js__["default"].getObjectValueByNames(layer[rootName], names);

if (__WEBPACK_IMPORTED_MODULE_6__Richang_JSEX_typeTYP_js__["a" /* default */].type(dataCaryonValue) === "object") {
if (dataCaryonValue["$hex"] != undefined && dataCaryonValue["$hex"][0] === "$") {
dataCaryonValue = dataCaryonValue["$hex"];
}
}
console.info("dataCaryonValue", dataCaryonValue);

if (!(dataCaryonValue != undefined && __WEBPACK_IMPORTED_MODULE_7__Richang_JSEX_objectOBJ_js__["default"].isEmptyObject(dataCaryonValue) != true)) {
_context5.next = 28;
_context5.next = 29;
break;
}

if (!varSystem.isFormula(dataCaryonValue)) {
_context5.next = 25;
_context5.next = 26;
break;
}

Expand All @@ -14671,31 +14676,31 @@ RenderCaryon.prototype.renderDocument = function () {
getValue: getValue
});

_context5.next = 22;
_context5.next = 23;
return varSystem.evalVar(dataCaryonValue, layer.id, names);

case 22:
case 23:
getValue = _context5.sent;
_context5.next = 26;
_context5.next = 27;
break;

case 25:
case 26:
getValue = dataCaryonValue;

case 26:
_context5.next = 32;
case 27:
_context5.next = 33;
break;

case 28:
_context5.next = 30;
case 29:
_context5.next = 31;
return _this._getLayerDataByNamse(rootName, names, layer.id);

case 30:
case 31:
getValue = _context5.sent;

console.info("getValue", getValue);

case 32:
case 33:

if (getValue != undefined) {
_varNames = assignmentValue.split(/[,,]/);
Expand All @@ -14720,22 +14725,22 @@ RenderCaryon.prototype.renderDocument = function () {
}
}

case 33:
_context5.next = 38;
case 34:
_context5.next = 39;
break;

case 35:
_context5.prev = 35;
case 36:
_context5.prev = 36;
_context5.t2 = _context5["catch"](1);

console.error(_context5.t2);

case 38:
case 39:
case "end":
return _context5.stop();
}
}
}, _callee5, this, [[1, 35]]);
}, _callee5, this, [[1, 36]]);
}));

return function _asDo2(_x20, _x21) {
Expand Down

0 comments on commit a16e34b

Please sign in to comment.