Commit 959f9d931a66a255e627182be042f8b64b20022e

Authored by ww
1 parent ce266ee5

fix: get all cells method

... ... @@ -4221,7 +4221,6 @@ App.prototype.loadFile = function (id, sameWindow, file, success, force) {
4221 4221 function getUserPermission() {
4222 4222 defHttp.get('/yt/role/me/permissions')
4223 4223 .then(res => {
4224   - console.log('enter')
4225 4224 USER_PERMISSION.permission = res
4226 4225 updateButtonContainer()
4227 4226 // var flag = hasSavePermission()
... ...
... ... @@ -13129,7 +13129,8 @@ class DispatchCenter {
13129 13129 const editor = editorUi.editor
13130 13130 this.graph = editor.graph
13131 13131 this.currentPage = currentPage
13132   - this.contentAllCell = this.graph.getDefaultParent().children || []
  13132 + // this.contentAllCell = this.graph.getDefaultParent().children || []
  13133 + this.contentAllCell = Object.entries(this.graph?.getModel()?.cells || {}).map(([_, item]) => item) || []
13133 13134 }
13134 13135
13135 13136 /**
... ... @@ -13351,7 +13352,8 @@ class HandleDataSource {
13351 13352 }
13352 13353
13353 13354 get contentAllCell() {
13354   - return this.graph.getDefaultParent().children || []
  13355 + // return this.graph.getDefaultParent().children || []
  13356 + return Object.entries(this.graph?.getModel()?.cells || {}).map(([_, item]) => item) || []
13355 13357 }
13356 13358
13357 13359 /**
... ... @@ -13985,7 +13987,8 @@ class HandleDataInteraction {
13985 13987 }
13986 13988
13987 13989 get contentAllCell() {
13988   - return this.graph.getDefaultParent().children || []
  13990 + // return this.graph.getDefaultParent().children || []
  13991 + return Object.entries(this.graph?.getModel()?.cells || {}).map(([_, item]) => item) || []
13989 13992 }
13990 13993
13991 13994 /**
... ... @@ -14487,7 +14490,8 @@ class HandleDynamicEffect {
14487 14490 }
14488 14491
14489 14492 get contentAllCell() {
14490   - return this.graph.getDefaultParent().children || []
  14493 + // return this.graph.getDefaultParent().children || []
  14494 + return Object.entries(this.graph?.getModel()?.cells || {}).map(([_, item]) => item) || []
14491 14495 }
14492 14496
14493 14497 /**
... ...