From 2c4266c574596a8eb83333df27ed56fa93199344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mime=20=C4=8Cuvalo?= Date: Tue, 16 Apr 2024 16:19:30 +0100 Subject: [PATCH] css more shapes that need transparent behavior (#3497) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Couple more shapes need the z-index rule enabled, basically the 'draw'-y shapes. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know --- RELEASES.md | 1 - packages/editor/editor.css | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index 1cfd910b1..dae512046 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -8,7 +8,6 @@ - Minor version bumps are released on a regular cadence. At the time of writing that cadence is monthly. **They may contain breaking changes**. We aim to make breaking changes as minimally disruptive as possible by providing warnings several releases in advance, and by providing tooling to help you migrate your code. We recommend updating tldraw at a similar pace to our release cadence, and be sure to check the release notes. - Patch version bumps are for bugfixes and hotfixes that can't wait for the next cadence release. - ## How to publish a new major or minor release New cadence releases are published from `main`. You trigger a release manually by running the workflow defined in `publish-new.yml`. diff --git a/packages/editor/editor.css b/packages/editor/editor.css index 150146e56..a161b28d3 100644 --- a/packages/editor/editor.css +++ b/packages/editor/editor.css @@ -1086,16 +1086,17 @@ input, * don't click on shapes that are behind other shapes. * One extra nuance is we don't use this behavior for: * - arrows which have weird geometry and just gets in the way. - * - draw shapes, because it feels restrictive to have them be 'in the way' of clicking on a textfield + * - draw/line shapes, because it feels restrictive to have them be 'in the way' of clicking on a textfield */ .tl-canvas[data-iseditinganything='true'] - .tl-shape:not([data-shape-type='arrow']):not([data-shape-type='draw']) { + .tl-shape:not( + [data-shape-type='arrow'], + [data-shape-type='draw'], + [data-shape-type='line'], + [data-shape-type='highlight'] + ) { pointer-events: all; } -/* But, re-disable the pointer-events rule for the svg container. */ -.tl-canvas[data-iseditinganything='true'] .tl-shape .tl-svg-container { - pointer-events: none; -} .tl-text-label[data-textwrap='true'] > .tl-text-label__inner { max-width: 100%;