Commit Graph

1099 Commits

Author SHA1 Message Date
Henrik Giesel
e581d593d3 Hide Float icons when width too small + Avoid too small resizing 2021-09-06 21:15:37 +10:00
Henrik Giesel
f379e18e6f 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
64a68743bd During resizing, make the smaller dimension decide the new dimensions 2021-09-06 21:15:37 +10:00
Henrik Giesel
f9000de16c 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
b07c46f88f Add margin to other side of dimensions 2021-09-06 21:15:37 +10:00
Henrik Giesel
5e80ef3562 Do not allow for resizing when in constrained mode 2021-09-06 21:15:37 +10:00
Henrik Giesel
4142fa2aa2 Don't show same dimensions twice if there are no custom dimensions 2021-09-06 21:15:37 +10:00
Henrik Giesel
92ed342547 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
1472dc854c Deal with case where no style.{width,height} is set for size dimensions 2021-09-06 21:15:37 +10:00
Henrik Giesel
be3aaa1519 Dispaly "actualHeight / actualWidth" even in constrained mode 2021-09-06 21:15:37 +10:00
Henrik Giesel
4da68e3583 Turn off no-explicit-warning for editing-area 2021-09-06 21:15:36 +10:00
Henrik Giesel
d22aa72964 Use ResizeObserver to resize overlay if necessary 2021-09-06 21:15:36 +10:00
Henrik Giesel
30e0894ad9 Reset image handle on keydown and blur 2021-09-06 21:15:36 +10:00
Henrik Giesel
c6e56e0465 Better RTL support 2021-09-06 21:15:36 +10:00
Henrik Giesel
def2333605 Move selector / active logic up to ImageHandle 2021-09-06 21:15:36 +10:00
Henrik Giesel
a09187007d Do not use width/height auto important to avoid enlarging smaller images 2021-09-06 21:15:36 +10:00
Henrik Giesel
a1df49b11e Implement Maximum image size mechanism 2021-09-06 21:15:36 +10:00
Henrik Giesel
8a8cd4ee38 Add float tooltips 2021-09-06 21:15:36 +10:00
Henrik Giesel
f902e91ebd Allow SW resize 2021-09-06 21:15:36 +10:00
Henrik Giesel
b3c921b86c Bind to style properties instead of events 2021-09-06 21:15:36 +10:00
Henrik Giesel
8429d00081 Add functionality to set float of image 2021-09-06 21:15:36 +10:00
Henrik Giesel
49da806d91 Image resizes preserves ratio 2021-09-06 21:15:36 +10:00
Henrik Giesel
1756bca212 Add image-handle-dimensions to show dimensions directly on image 2021-09-06 21:15:36 +10:00
Henrik Giesel
0b06891771 First implementation of ImageHandle 2021-09-06 21:15:36 +10:00
Damien Elmes
41c4be2f54 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
6909a095d5
Merge pull request #1332 from hgiesel/svelteexportcontext
Shorten CSS references for `@import` or `@use`
2021-09-06 21:10:27 +10:00
Henrik Giesel
03818b7c45 Disallow setting, deleting or defining properties on packages 2021-09-03 00:52:39 +02:00
Henrik Giesel
516007518c Add ts/sass/anki, a symlink to ts/sass for add-ons 2021-09-03 00:18:17 +02:00
Henrik Giesel
677a33f585 Fix for svelte_check 2021-09-02 23:37:17 +02:00
Henrik Giesel
8ff8186aab Uniformly shorten SCSS imports/uses 2021-09-02 23:37:17 +02:00
Henrik Giesel
4a2d2a75c1 Directly include CSS from bootstrap and codemirror packages 2021-09-02 23:37:16 +02:00
Henrik Giesel
4737a99809 Add source for block level elements 2021-09-02 22:31:25 +10:00
Henrik Giesel
1363a40273 Remove special treatment of empty anki-editable 2021-09-02 22:31:25 +10:00
Henrik Giesel
01a283bb99 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
cb5cb006a9
Merge pull request #1350 from hgiesel/exportshortcuts
Implement register-package and export some packages
2021-09-02 22:23:12 +10:00
Damien Elmes
d210a21787
Merge pull request #1351 from hgiesel/fontisinline
Add FONT as an inline tag
2021-09-02 22:22:19 +10:00
Damien Elmes
b9d9343f51 don't allow | in generic family 2021-09-02 21:05:17 +10:00
Henrik Giesel
cc8ee65eaf Add FONT as an inline tag 2021-08-31 13:59:07 +02:00
Henrik Giesel
6e0f7c3d53 Implement register-package and export some packages
Exported packages are:
* anki/packages
* anki/shortcuts
* anki/bridgecommand
2021-08-30 14:41:40 +02:00
Damien Elmes
ab8e53f66e fix incorrect calendar day labels
https://forums.ankiweb.net/t/day-of-the-week-legend-on-heatmap/9450/7
2021-08-24 12:17:35 +10:00
Damien Elmes
1dd3583b43
Merge pull request #1340 from hgiesel/exportinternal
Export Svelte internals
2021-08-24 10:42:17 +10:00
Damien Elmes
12ea482c87 expose require() instead of the svelte global
- Means add-on authors should not need to inject any code in their build
- Should be more flexible - we can export multiple libraries if we wish,
and don't have to worry about require() being clobbered by old add-ons.
2021-08-24 10:22:07 +10:00
Henrik Giesel
fdf8321253 Rename cross-unit to export-internal 2021-08-23 23:45:50 +02:00
Henrik Giesel
c69232921a Update Svelte to 3.42.2 2021-08-23 23:38:16 +02:00
Henrik Giesel
fea4f17107 Export WithShortcut 2021-08-23 21:23:04 +02:00
Henrik Giesel
1495fdf311 Export svelte_internal as library on window object
Closes https://github.com/ankitects/anki/issues/1328.
2021-08-23 21:16:15 +02:00
Damien Elmes
1b2d57d956 add note about interday learning cards being fetched preferentially
+ priority->order
2021-08-22 15:32:46 +10:00
Damien Elmes
05124eecf7 adding options to sort by ascending/descending ease 2021-08-22 15:32:46 +10:00
Damien Elmes
ce4dcab9e4
Merge pull request #1335 from hikaru-y/fix-editor-fontfamily
Quote font family names
2021-08-20 14:39:29 +10:00
Damien Elmes
131c8b72f8 add options to v3 to preserve new card gather order
Allows cards to be presented in deck order when gather priority is set
to 'deck'.
2021-08-20 12:03:32 +10:00