@logicflow/core
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -353,6 +353,3 @@ var __assign = (this && this.__assign) || function () { | ||
BaseEdgeModel.prototype.setProperty = function (key, val) { | ||
var preProperties = toJS(this.properties); | ||
var newProperties = cloneDeep(preProperties); | ||
set(newProperties, key, formatData(val)); | ||
this.properties = newProperties; | ||
set(this.properties, key, formatData(val)); | ||
this.setAttributes(); | ||
@@ -359,0 +356,0 @@ }; |
@@ -702,3 +702,2 @@ var __assign = (this && this.__assign) || function () { | ||
// 使用 lodash 的 set 方法更新某个属性,可以支持 key 为 'a.b.c' 的情况 | ||
// TODO:待测试 | ||
set(nextProperties, key, formatData(val)); | ||
@@ -705,0 +704,0 @@ this.updateProperties(nextProperties, [key]); |
@@ -1,1 +0,1 @@ | ||
export declare const isIe: boolean; | ||
export declare const isIe: () => boolean; |
import { get } from 'lodash-es'; | ||
export var isIe = get(window, 'navigator.userAgent', '').match(/MSIE|Trident/) !== null; | ||
export var isIe = function () { | ||
return get(window, 'navigator.userAgent', '').match(/MSIE|Trident/) !== null; | ||
}; |
@@ -168,3 +168,3 @@ var __extends = (this && this.__extends) || (function () { | ||
_this.onMouseOut = function (ev) { | ||
if (isIe) { | ||
if (isIe()) { | ||
_this.setHoverOff(ev); | ||
@@ -171,0 +171,0 @@ } |
@@ -356,6 +356,3 @@ "use strict"; | ||
BaseEdgeModel.prototype.setProperty = function (key, val) { | ||
var preProperties = (0, mobx_1.toJS)(this.properties); | ||
var newProperties = (0, lodash_es_1.cloneDeep)(preProperties); | ||
(0, mobx_1.set)(newProperties, key, (0, util_1.formatData)(val)); | ||
this.properties = newProperties; | ||
(0, mobx_1.set)(this.properties, key, (0, util_1.formatData)(val)); | ||
this.setAttributes(); | ||
@@ -362,0 +359,0 @@ }; |
@@ -705,3 +705,2 @@ "use strict"; | ||
// 使用 lodash 的 set 方法更新某个属性,可以支持 key 为 'a.b.c' 的情况 | ||
// TODO:待测试 | ||
(0, lodash_es_1.set)(nextProperties, key, (0, util_1.formatData)(val)); | ||
@@ -708,0 +707,0 @@ this.updateProperties(nextProperties, [key]); |
@@ -1,1 +0,1 @@ | ||
export declare const isIe: boolean; | ||
export declare const isIe: () => boolean; |
@@ -5,2 +5,5 @@ "use strict"; | ||
var lodash_es_1 = require("lodash-es"); | ||
exports.isIe = (0, lodash_es_1.get)(window, 'navigator.userAgent', '').match(/MSIE|Trident/) !== null; | ||
var isIe = function () { | ||
return (0, lodash_es_1.get)(window, 'navigator.userAgent', '').match(/MSIE|Trident/) !== null; | ||
}; | ||
exports.isIe = isIe; |
@@ -172,3 +172,3 @@ "use strict"; | ||
_this.onMouseOut = function (ev) { | ||
if (util_1.isIe) { | ||
if ((0, util_1.isIe)()) { | ||
_this.setHoverOff(ev); | ||
@@ -175,0 +175,0 @@ } |
{ | ||
"name": "@logicflow/core", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "LogicFlow, help you quickly create flowcharts", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -429,7 +429,3 @@ import { assign, cloneDeep, find, isUndefined } from 'lodash-es' | ||
@action setProperty(key: string, val: any): void { | ||
const preProperties = toJS(this.properties) | ||
const newProperties = cloneDeep(preProperties) | ||
set(newProperties, key, formatData(val)) | ||
this.properties = newProperties | ||
set(this.properties, key, formatData(val)) | ||
this.setAttributes() | ||
@@ -436,0 +432,0 @@ } |
@@ -804,3 +804,2 @@ import { action, computed, isObservable, observable, toJS } from 'mobx' | ||
// 使用 lodash 的 set 方法更新某个属性,可以支持 key 为 'a.b.c' 的情况 | ||
// TODO:待测试 | ||
set(nextProperties, key, formatData(val)) | ||
@@ -807,0 +806,0 @@ |
import { get } from 'lodash-es' | ||
export const isIe = | ||
export const isIe = () => | ||
get(window, 'navigator.userAgent', '').match(/MSIE|Trident/) !== null |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5479946
570
64868