An exception occurs when a pool is placed on a custom element


#1

Hi,
When I ran custom-elements, I met this problem. How can I solve this problem?
Thanks


#2

Hi @lhzxxy
do you use the custom elements example or did you create your own module? Make sure to provide some code to us so we can help you in detail.


#3

Hi,Niklas_Kiefer
Yes, I use this demo, but I did not modify the source code. I just npm install and npm run dev.


#4

Are there any errors in the console?


#5

This is part of the console output:

node_modules\diagram-js\lib\core\EventBus.js:370 unhandled error in event listener
EventBus._invokeListener @ node_modules\diagram-js\lib\core\EventBus.js:370
EventBus._invokeListeners @ node_modules\diagram-js\lib\core\EventBus.js:344
EventBus.fire @ node_modules\diagram-js\lib\core\EventBus.js:304
CommandStack._popAction @ node_modules\diagram-js\lib\command\CommandStack.js:454
CommandStack.execute @ node_modules\diagram-js\lib\command\CommandStack.js:148
Modeling.createShape @ node_modules\diagram-js\lib\features\modeling\Modeling.js:288
(anonymous) @ node_modules\diagram-js\lib\features\create\Create.js:244
invokeFunction @ node_modules\diagram-js\lib\core\EventBus.js:480
EventBus._invokeListener @ node_modules\diagram-js\lib\core\EventBus.js:356
EventBus._invokeListeners @ node_modules\diagram-js\lib\core\EventBus.js:344
EventBus.fire @ node_modules\diagram-js\lib\core\EventBus.js:304
fire @ node_modules\diagram-js\lib\features\dragging\Dragging.js:170
end @ node_modules\diagram-js\lib\features\dragging\Dragging.js:258
trapClickAndEnd @ node_modules\diagram-js\lib\features\dragging\Dragging.js:307
node_modules\diagram-js\lib\core\EventBus.js:371 TypeError: Cannot read property 'insertBefore' of undefined
    at prependTo (node_modules\diagram-js\lib\core\GraphicsFactory.js:225)
    at node_modules\diagram-js\lib\core\GraphicsFactory.js:157
    at forEach (node_modules\min-dash\dist\index.js:170)
    at node_modules\diagram-js\lib\core\GraphicsFactory.js:154
    at forEach (node_modules\min-dash\dist\index.js:170)
    at GraphicsFactory.updateContainments (node_modules\diagram-js\lib\core\GraphicsFactory.js:144)
    at node_modules\diagram-js\lib\features\change-support\ChangeSupport.js:50
    at invokeFunction (node_modules\diagram-js\lib\core\EventBus.js:480)
    at EventBus._invokeListener (node_modules\diagram-js\lib\core\EventBus.js:356)
    at EventBus._invokeListeners (node_modules\diagram-js\lib\core\EventBus.js:344)
EventBus._invokeListener @ node_modules\diagram-js\lib\core\EventBus.js:371
EventBus._invokeListeners @ node_modules\diagram-js\lib\core\EventBus.js:344

#6

There is an error in GraphicsFactory#updateContainments that seems to be caused be the custom elements. Are you familiar with debugging? Would you like to investigate this further?


#7

Sorry, I am not really familiar with this tool. Maybe I can have a try.