0
各グループ内に2つのグループに円または四角形があります。ユーザーがどのグループがアクティブであるかを知るために、クリック時にグループを強調表示し、境界線を強調表示する必要があります。Konvajs Group Highlight with Border
各グループ内に2つのグループに円または四角形があります。ユーザーがどのグループがアクティブであるかを知るために、クリック時にグループを強調表示し、境界線を強調表示する必要があります。Konvajs Group Highlight with Border
これを実行する方法はたくさんあります。たとえば、次のように
group.on('click',() => {
// toggle selected, this is just our custom property
group.isSelected = !group.isSelected;
// hide or show selection box
selectionRect.visible(group.isSelected);
// set box size and position
selectionRect.setAttrs(group.getClientRect());
layer.draw();
})
デモ:
http://jsbin.com/nucopakijo/1/edit?html,js,outputは私がKonva.jsとその非常に良いでは初心者です、ありがとうございます。 – abhiklpm