Over the last week, I focused on the work-in-progress image editor.
Last week
Image editor
-
Published a work-in-progress version of the editor
-
Selection and eraser tools
- The selection tool can currently only select rectangular regions with edges along the canvas' XY axes.
- Rotation/resizing can be done through the selection tool.
- The eraser can only erase entire strokes.
-
Saving/loading SVG data (not connected to Joplin)
- SVG data is loaded into an iframe with
sandbox
set to disable JavaScript and the content security policy (csp
attribute) set to hopefully prevent fetching resources that aren't a part of the SVG.
- SVG data is loaded into an iframe with
-
Fixed an issue in the (custom ) matrix library used by the editor: Some invertible matrices could not be inverted.
- A custom matrix library is currently being used. It has:
- Small, 3x3-only matrices that can translate/scale/rotate
Vec2
s. - Immutable matrices, vectors, rectangles, line segment, and path objects
- Immutable data structures make undo/redo much easier.
-
Vec2
s that can be easily converted from/to the objects used by bezier-js - I didn't find an existing matrix/vector library that does this (immutable data structures and optimized for 3x3 matrices)
- Small, 3x3-only matrices that can translate/scale/rotate
- A custom matrix library is currently being used. It has:
-
Added an HTML-based toolbar to the editor
- Allows switching tools and has dropdowns for configuring pens.
- Shows previews for pens based on the current stroke size/color.
- The color picker is provided by the Coloris library.
-
Added a view that shows the progress of long operations.
Other
This week
- Connect the image editor to Joplin's mobile app
- Start popup-based redesign and implementation of the markdown toolbar (see Mobile: Add markdown toolbar by personalizedrefrigerator · Pull Request #6703 · laurent22/joplin · GitHub)