KonvaJs Group's hide() or show() methods do not affect the visibility of its children

27 Views Asked by At

i have created a group in konvaJs ShoulderPatternGroup = new Konva.Group(); Then, I added some shapes to it such as circles and lines:

var circle = new Konva.Circle({
    x: stage.getRelativePointerPosition().x,
    y: stage.getRelativePointerPosition().y,
    radius: 3,
    stroke: '#DCF2F1',
    strokeWidth: 2,
    draggable: true,
});
ShoulderPatternGroup.add(circle);

In another function, after calling ShoulderPatternGroup.hide() or ShoulderPatternGroup.show(), the visibility of the group changes but it does not affect its children (circles and lines).

What is wrong with my code?

i want to disappear all of group elements after calling .hide() and show them after calling .show()

0

There are 0 best solutions below