diff --git a/src/css/ingame_hud/pinned_shapes.scss b/src/css/ingame_hud/pinned_shapes.scss index 8ff13fe7..671f5aa5 100644 --- a/src/css/ingame_hud/pinned_shapes.scss +++ b/src/css/ingame_hud/pinned_shapes.scss @@ -17,13 +17,10 @@ grid-template-rows: 1fr 1fr; @include S(margin-bottom, 4px); color: #333438; - // text-shadow: #{D(1px)} #{D(1px)} 0 rgba(0, 10, 20, 0.2); - &.unpinable { - > canvas { - cursor: pointer; - pointer-events: all; - } + &.removable { + cursor: pointer; + pointer-events: all; } > canvas { @@ -31,16 +28,9 @@ @include S(height, 25px); grid-column: 1 / 2; grid-row: 1 / 3; - pointer-events: all; - transition: transform 0.1s ease-in-out; - transform-origin: D(2px) center; - will-change: transform; - position: relative; + pointer-events: none; z-index: 20; - &:hover { - transform: scale(2); - z-index: 21; - } + position: relative; } > .amountLabel, diff --git a/src/js/game/hud/parts/pinned_shapes.js b/src/js/game/hud/parts/pinned_shapes.js index 10c1f88a..542a38b2 100644 --- a/src/js/game/hud/parts/pinned_shapes.js +++ b/src/js/game/hud/parts/pinned_shapes.js @@ -217,11 +217,11 @@ export class HUDPinnedShapes extends BaseHUDPart { let detector = null; if (canUnpin) { - element.classList.add("unpinable"); + element.classList.add("removable"); detector = new ClickDetector(element, { consumeEvents: true, preventDefault: true, - targetOnly: true, + targetOnly: false, }); detector.click.add(() => this.unpinShape(key)); } else { @@ -294,6 +294,7 @@ export class HUDPinnedShapes extends BaseHUDPart { * @param {string} key */ unpinShape(key) { + console.log("unpin", key); arrayDeleteValue(this.pinnedShapes, key); this.rerenderFull(); }