Commit c0ed1d81c810d9a0c449c64ea1d5b91491da42d5
1 parent
175d972f
fix: fix configuration in phone event throw error
Showing
2 changed files
with
17 additions
and
8 deletions
@@ -248,10 +248,12 @@ | @@ -248,10 +248,12 @@ | ||
248 | // Changes paths for local development environment | 248 | // Changes paths for local development environment |
249 | if (urlParams['dev'] == '1') { | 249 | if (urlParams['dev'] == '1') { |
250 | // Used to request grapheditor/mxgraph sources in dev mode | 250 | // Used to request grapheditor/mxgraph sources in dev mode |
251 | - var mxDevUrl = document.location.protocol + '//devhost.jgraph.com/drawio/src/main'; | 251 | + // var mxDevUrl = document.location.protocol + '//devhost.jgraph.com/drawio/src/main'; |
252 | + var mxDevUrl = document.location.protocol + '//192.168.10.104:8083/thingskit-drawio/'; | ||
252 | 253 | ||
253 | // Used to request draw.io sources in dev mode | 254 | // Used to request draw.io sources in dev mode |
254 | - var drawDevUrl = document.location.protocol + '//devhost.jgraph.com/drawio/src/main/webapp/'; | 255 | + // var drawDevUrl = document.location.protocol + '//devhost.jgraph.com/drawio/src/main/webapp/'; |
256 | + var drawDevUrl = document.location.protocol + '//192.168.10.104:8083/thingskit-drawio/'; | ||
255 | var geBasePath = drawDevUrl + '/js/grapheditor'; | 257 | var geBasePath = drawDevUrl + '/js/grapheditor'; |
256 | var mxBasePath = mxDevUrl + '/mxgraph'; | 258 | var mxBasePath = mxDevUrl + '/mxgraph'; |
257 | 259 |
@@ -7525,7 +7525,6 @@ DataFormatPanel.prototype.addDataFont = function (container) { | @@ -7525,7 +7525,6 @@ DataFormatPanel.prototype.addDataFont = function (container) { | ||
7525 | url: '/yt/oss/upload', | 7525 | url: '/yt/oss/upload', |
7526 | method: 'post', | 7526 | method: 'post', |
7527 | choose(obj) { | 7527 | choose(obj) { |
7528 | - console.log('enter choose') | ||
7529 | obj.preview(async function (index, file, result) { | 7528 | obj.preview(async function (index, file, result) { |
7530 | const formData = new FormData() | 7529 | const formData = new FormData() |
7531 | formData.set('file', file) | 7530 | formData.set('file', file) |
@@ -7537,7 +7536,6 @@ DataFormatPanel.prototype.addDataFont = function (container) { | @@ -7537,7 +7536,6 @@ DataFormatPanel.prototype.addDataFont = function (container) { | ||
7537 | imageState[enumConst.IMAGE_GALLERY_IMAGE_PATH] = fileStaticUri | 7536 | imageState[enumConst.IMAGE_GALLERY_IMAGE_PATH] = fileStaticUri |
7538 | $(`#${enumActionEl.IMAGE_UPLOAD_STATE_EL}`).html('上传成功').css({ color: '#5fb878' }) | 7537 | $(`#${enumActionEl.IMAGE_UPLOAD_STATE_EL}`).html('上传成功').css({ color: '#5fb878' }) |
7539 | } else { | 7538 | } else { |
7540 | - console.log(err) | ||
7541 | $(`#${enumActionEl.IMAGE_UPLOAD_STATE_EL}`).html('上传失败').css({ color: 'red' }) | 7539 | $(`#${enumActionEl.IMAGE_UPLOAD_STATE_EL}`).html('上传失败').css({ color: 'red' }) |
7542 | } | 7540 | } |
7543 | }); | 7541 | }); |
@@ -13064,7 +13062,6 @@ class HandleDataInteraction { | @@ -13064,7 +13062,6 @@ class HandleDataInteraction { | ||
13064 | */ | 13062 | */ |
13065 | generatorEventMapping() { | 13063 | generatorEventMapping() { |
13066 | const event = this.eventList | 13064 | const event = this.eventList |
13067 | - console.log('event list', event) | ||
13068 | for (const item of event) { | 13065 | for (const item of event) { |
13069 | const { content, id: nodeId, enabled, type } = item | 13066 | const { content, id: nodeId, enabled, type } = item |
13070 | if (!enabled) continue | 13067 | if (!enabled) continue |
@@ -13114,7 +13111,10 @@ class HandleDataInteraction { | @@ -13114,7 +13111,10 @@ class HandleDataInteraction { | ||
13114 | * @param sender | 13111 | * @param sender |
13115 | */ | 13112 | */ |
13116 | handleMouseDownEvent(eventName, event, sender) { | 13113 | handleMouseDownEvent(eventName, event, sender) { |
13117 | - const { state: { cell: { id } = {} } = {} } = event | 13114 | + const { state } = event |
13115 | + if (!state) return | ||
13116 | + const { cell = {} } = state | ||
13117 | + const { id } = cell || {} | ||
13118 | const temp = this.eventMapping.get(id) | 13118 | const temp = this.eventMapping.get(id) |
13119 | if (temp && temp.has(DispatchCenter.enumEventType.DOWN)) { | 13119 | if (temp && temp.has(DispatchCenter.enumEventType.DOWN)) { |
13120 | const content = temp.get(DispatchCenter.enumEventType.DOWN) | 13120 | const content = temp.get(DispatchCenter.enumEventType.DOWN) |
@@ -13129,7 +13129,10 @@ class HandleDataInteraction { | @@ -13129,7 +13129,10 @@ class HandleDataInteraction { | ||
13129 | * @param sender | 13129 | * @param sender |
13130 | */ | 13130 | */ |
13131 | handleMouseUpEvent(eventName, event, sender) { | 13131 | handleMouseUpEvent(eventName, event, sender) { |
13132 | - const { state: { cell: { id } = {} } = {} } = event | 13132 | + const { state } = event |
13133 | + if (!state) return | ||
13134 | + const { cell = {} } = state | ||
13135 | + const { id } = cell || {} | ||
13133 | const temp = this.eventMapping.get(id) | 13136 | const temp = this.eventMapping.get(id) |
13134 | if (temp && temp.has(DispatchCenter.enumEventType.UP)) { | 13137 | if (temp && temp.has(DispatchCenter.enumEventType.UP)) { |
13135 | const content = temp.get(DispatchCenter.enumEventType.UP) | 13138 | const content = temp.get(DispatchCenter.enumEventType.UP) |
@@ -13142,7 +13145,10 @@ class HandleDataInteraction { | @@ -13142,7 +13145,10 @@ class HandleDataInteraction { | ||
13142 | * @param event | 13145 | * @param event |
13143 | */ | 13146 | */ |
13144 | handleClickEvent(event) { | 13147 | handleClickEvent(event) { |
13145 | - const { state: { cell: { id } = {} } = {} } = event | 13148 | + const { state } = event |
13149 | + if (!state) return | ||
13150 | + const { cell = {} } = state | ||
13151 | + const { id } = cell || {} | ||
13146 | const temp = this.eventMapping.get(id) | 13152 | const temp = this.eventMapping.get(id) |
13147 | if (temp && temp.has(DispatchCenter.enumEventType.SINGLE)) { | 13153 | if (temp && temp.has(DispatchCenter.enumEventType.SINGLE)) { |
13148 | const content = temp.get(DispatchCenter.enumEventType.SINGLE) | 13154 | const content = temp.get(DispatchCenter.enumEventType.SINGLE) |
@@ -13161,6 +13167,7 @@ class HandleDataInteraction { | @@ -13161,6 +13167,7 @@ class HandleDataInteraction { | ||
13161 | * @param cell | 13167 | * @param cell |
13162 | */ | 13168 | */ |
13163 | handleDoubleClickEvent(event, cell = {}) { | 13169 | handleDoubleClickEvent(event, cell = {}) { |
13170 | + if (!cell) return | ||
13164 | const { id } = cell | 13171 | const { id } = cell |
13165 | const temp = this.eventMapping.get(id) | 13172 | const temp = this.eventMapping.get(id) |
13166 | if (temp && temp.has(DispatchCenter.enumEventType.DOUBLE)) { | 13173 | if (temp && temp.has(DispatchCenter.enumEventType.DOUBLE)) { |