[DMN] Overriding handler for `element.updateProperties`
See original GitHub issueDescribe the Bug
On a branch with dmn-js@8.0.0-alpha.1
, I am not able to switch from DRD view to Decision Table or Literal Expression. It seems that we reuse the Command Stack object in Modeler. I could not reproduce it on bare dmn-js
.
[/Users/maciej/workspace/bpmn-io/dmn-js/packages/dmn-js/test/spec/diagram.dmn] overriding handler for command <element.updateProperties>
at o._setHandler (webpack:///node_modules/diagram-js/lib/command/CommandStack.js:501:10)
at _setHandler (webpack:///node_modules/diagram-js/lib/command/CommandStack.js:268:7)
at register (webpack:///node_modules/diagram-js/lib/command/CommandStack.js:286:7)
at file:///Users/maciej/workspace/bpmn-io/camunda-modeler/dist/mac/Camunda%20Modeler.app/Contents/Resources/app.asar/public/6.6.js:8:528369
at iterator (webpack:///node_modules/min-dash/dist/index.esm.js:166:19)
at file:///Users/maciej/workspace/bpmn-io/camunda-modeler/dist/mac/Camunda%20Modeler.app/Contents/Resources/app.asar/public/6.6.js:8:528349
at file:///Users/maciej/workspace/bpmn-io/camunda-modeler/dist/mac/Camunda%20Modeler.app/Contents/Resources/app.asar/public/6.6.js:8:528393
at file:///Users/maciej/workspace/bpmn-io/camunda-modeler/dist/mac/Camunda%20Modeler.app/Contents/Resources/app.asar/public/2.2.js:1:45959
at listener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:366:33)
at _invokeListener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:351:23) [ error ]
Steps to Reproduce
git checkout dmn-1-3-experiments
- Open DMN diagram
- Try to switch view to Decision Table or Literal Expression
When doing (3) via Drill Down, there will be only an error in the log and nothing else. Switching via tab links crashes the tab.
Expected Behavior
It should work.
Environment
- OS: MacOS 10.15.2
- Camunda Modeler Version: this branch
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Path definition - Forum - bpmn.io
helper/ElementHelper'); /** * A handler capable of creating a new element under a provided parent * and updating / creating a reference to...
Read more >Override a delegated event handler for a specific element only ...
To override existing handler you can do so by extracting the handler that was already assigned then turn off handlers for all spans...
Read more >Overriding Handlers
This option allows multiple overriding handlers to coexist. In other words, this option is considered a non-exclusive override.
Read more >Override or set property to React element - DEV Community
That is all there is to it really. The cloned element will have all the same props but a new click handler. And...
Read more >JavaScript HTML DOM EventListener - W3Schools
The addEventListener() method attaches an event handler to an element without overwriting existing event handlers. You can add many event handlers to one ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please investigate this one further. Both editors are instantiated separaterly via
didi
and ment to be entirely independent. So any re-use is essentially a bug.Fixed via https://github.com/camunda/camunda-modeler/pull/1688