This extension uses a modified version of the RoughNotation library.
We use the version from PR #88 which adds the animateOnHide feature for smooth reverse animations when hiding annotations.
-
Clone the PR branch:
git clone --depth 1 --branch feature/animated-hide https://github.com/BeksOmega/rough-notation.git /tmp/rough-notation-pr88
-
Install dependencies and build:
cd /tmp/rough-notation-pr88 npm install npm run build -
Copy the built file to the extension:
cp /tmp/rough-notation-pr88/lib/rough-notation.iife.js _extensions/roughnotation/assets/rough-notation.iife.js
-
Clean up:
rm -rf /tmp/rough-notation-pr88
Once PR #88 is merged into the main rough-notation repository and a new version is released, you can update to the official version:
- Download the latest release from https://github.com/rough-stuff/rough-notation/releases
- Copy
rough-notation.iife.jsto_extensions/roughnotation/assets/
animateOnHide: true- Enables reverse animation when callingannotation.hide()
This eliminates the need for custom fade-out logic in rough.js.