Henrik Giesel
027db43664
Implement new resizing algorithm
...
* resizes against the original parameters
2021-09-06 21:15:37 +10:00
Henrik Giesel
e2d345bfd2
Manage CSSStyleSheet from within SizeSelect where each image has one rule
2021-09-06 21:15:37 +10:00
Henrik Giesel
16a394fa7d
Hide Float icons when width too small + Avoid too small resizing
2021-09-06 21:15:37 +10:00
Henrik Giesel
ccc44d1632
Revert "During resizing, make the smaller dimension decide the new dimensions"
...
This reverts commit 5bad9a913ce7b4a4cc58106936203fddec37d6da.
The previous behavior was the one you can observe in most graphical editors:
The bigger dimension (width or height) will decide the size, not the smaller one.
2021-09-06 21:15:37 +10:00
Henrik Giesel
0ffa5030e5
During resizing, make the smaller dimension decide the new dimensions
2021-09-06 21:15:37 +10:00
Henrik Giesel
a7fa217306
Reset height, so it defaults to "auto"
...
* This allows more flexible dynamic resizing for the image in the (p)reviewer
2021-09-06 21:15:37 +10:00
Henrik Giesel
3fe1180f39
Add margin to other side of dimensions
2021-09-06 21:15:37 +10:00
Henrik Giesel
63fed87b48
Do not allow for resizing when in constrained mode
2021-09-06 21:15:37 +10:00
Henrik Giesel
c4f47be673
Don't show same dimensions twice if there are no custom dimensions
2021-09-06 21:15:37 +10:00
Henrik Giesel
db558c869d
Change position of float buttons and dimension
...
* So we can show dimensions at lower image sizes
2021-09-06 21:15:37 +10:00
Henrik Giesel
fce63ed718
Deal with case where no style.{width,height} is set for size dimensions
2021-09-06 21:15:37 +10:00
Henrik Giesel
460b6f33c9
Dispaly "actualHeight / actualWidth" even in constrained mode
2021-09-06 21:15:37 +10:00
Henrik Giesel
2a548f2ebd
Turn off no-explicit-warning for editing-area
2021-09-06 21:15:36 +10:00
Henrik Giesel
e8ec6b61a7
Use ResizeObserver to resize overlay if necessary
2021-09-06 21:15:36 +10:00
Henrik Giesel
2224d1c287
Reset image handle on keydown and blur
2021-09-06 21:15:36 +10:00
Henrik Giesel
796037649a
Better RTL support
2021-09-06 21:15:36 +10:00
Henrik Giesel
427a49e036
Adjust actual size tooltip
2021-09-06 21:15:36 +10:00
Henrik Giesel
9342d19504
Move selector / active logic up to ImageHandle
2021-09-06 21:15:36 +10:00
Henrik Giesel
47cd308251
Do not use width/height auto important to avoid enlarging smaller images
2021-09-06 21:15:36 +10:00
Henrik Giesel
7696a181f3
Implement Maximum image size mechanism
2021-09-06 21:15:36 +10:00
Henrik Giesel
a6b071d849
Add float tooltips
2021-09-06 21:15:36 +10:00
Henrik Giesel
5257a4db26
Allow SW resize
2021-09-06 21:15:36 +10:00
Henrik Giesel
5e91108a79
Bind to style properties instead of events
2021-09-06 21:15:36 +10:00
Henrik Giesel
b919b9cb7f
Add functionality to set float of image
2021-09-06 21:15:36 +10:00
Henrik Giesel
2a81273115
Image resizes preserves ratio
2021-09-06 21:15:36 +10:00
Henrik Giesel
9b97320438
Add image-handle-dimensions to show dimensions directly on image
2021-09-06 21:15:36 +10:00
Henrik Giesel
53d1435aa7
First implementation of ImageHandle
2021-09-06 21:15:36 +10:00
Damien Elmes
3e5a2a92c7
Introduce editable-container
...
Contains the shadow root, and references to the styles.
Is ignorant of Editable.
Is necessary, so our we editable.scss does not need to contain
information about Codable, ImageHandle or all those other things which
have nothing to do with Editable
2021-09-06 21:15:36 +10:00
Damien Elmes
f07b72a708
Merge pull request #1332 from hgiesel/svelteexportcontext
...
Shorten CSS references for `@import` or `@use`
2021-09-06 21:10:27 +10:00
Damien Elmes
666f45ba01
Merge pull request #1356 from tatsumoto-ren/editor_will_process_mime
...
Add a hook for modifiying pasted MIME data
2021-09-06 21:03:37 +10:00
Damien Elmes
78242c9053
Merge pull request #1354 from hgiesel/preventoverwrite
...
Disallow setting, deleting or defining properties on packages
2021-09-06 20:57:37 +10:00
Damien Elmes
e8e0f9d08c
update translations
2021-09-06 18:31:36 +10:00
Damien Elmes
53917b5032
add comment to segoe-ui string
...
https://forums.ankiweb.net/t/font-family-bug/12993/3
2021-09-06 18:29:26 +10:00
Ren Tatsumoto
37b00d9ca3
avoid possible performance hit
2021-09-05 16:10:34 +03:00
Ren Tatsumoto
b6e52b929d
fix test complaints
2021-09-05 15:04:24 +03:00
Ren Tatsumoto
b6f899dbd1
update CONTRIBUTORS
2021-09-05 13:52:54 +03:00
Ren Tatsumoto
ef24288639
Add a hook for modifiying pasted MIME data
2021-09-05 13:52:54 +03:00
Henrik Giesel
dc9a65bd8b
Disallow setting, deleting or defining properties on packages
2021-09-03 00:52:39 +02:00
Henrik Giesel
7cb3c4a996
Add ts/sass/anki, a symlink to ts/sass for add-ons
2021-09-03 00:18:17 +02:00
Henrik Giesel
269b75ef4e
Fix for svelte_check
2021-09-02 23:37:17 +02:00
Henrik Giesel
1f34b666b9
Uniformly shorten SCSS imports/uses
2021-09-02 23:37:17 +02:00
Henrik Giesel
c521568303
Directly include CSS from bootstrap and codemirror packages
2021-09-02 23:37:16 +02:00
Damien Elmes
30395e3e9d
Merge pull request #1353 from hgiesel/checkforblockinstead
...
Check for non-existence of block tags instead of exclusive existence of inline tags in editable
2021-09-02 22:39:58 +10:00
Henrik Giesel
0667706d60
Add source for block level elements
2021-09-02 22:31:25 +10:00
Henrik Giesel
f7954af1be
Remove special treatment of empty anki-editable
2021-09-02 22:31:25 +10:00
Henrik Giesel
47252983c5
Check for non-existence of block tags instead of exclusive existence of inline tags in editable
2021-09-02 22:31:25 +10:00
Damien Elmes
f5bbeba218
Merge pull request #1350 from hgiesel/exportshortcuts
...
Implement register-package and export some packages
2021-09-02 22:23:12 +10:00
Damien Elmes
575ddb6cc6
Merge pull request #1351 from hgiesel/fontisinline
...
Add FONT as an inline tag
2021-09-02 22:22:19 +10:00
Damien Elmes
3fc1ead668
don't allow | in generic family
2021-09-02 21:05:17 +10:00
Damien Elmes
acda398a2e
quote fonts added via the Add Field dialog
2021-09-02 21:05:16 +10:00