mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
Allow SW resize
This commit is contained in:
parent
b3c921b86c
commit
f902e91ebd
1 changed files with 10 additions and 13 deletions
|
@ -74,18 +74,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
image!.style.height = `${height}px`;
|
image!.style.height = `${height}px`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function floatLeft(): void {
|
|
||||||
image!.style.float = "left";
|
|
||||||
}
|
|
||||||
|
|
||||||
function floatRight(): void {
|
|
||||||
image!.style.float = "right";
|
|
||||||
}
|
|
||||||
|
|
||||||
function floatReset(): void {
|
|
||||||
image!.style.float = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
const nightMode = getContext(nightModeKey);
|
const nightMode = getContext(nightModeKey);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -104,7 +92,12 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</div>
|
</div>
|
||||||
<div class:nightMode class="image-handle-control image-handle-control-nw" />
|
<div class:nightMode class="image-handle-control image-handle-control-nw" />
|
||||||
<div class:nightMode class="image-handle-control image-handle-control-ne" />
|
<div class:nightMode class="image-handle-control image-handle-control-ne" />
|
||||||
<div class:nightMode class="image-handle-control image-handle-control-sw" />
|
<div
|
||||||
|
class:nightMode
|
||||||
|
class="image-handle-control image-handle-control-sw is-active"
|
||||||
|
on:pointerdown={setPointerCapture}
|
||||||
|
on:pointermove={resize}
|
||||||
|
/>
|
||||||
<div
|
<div
|
||||||
class:nightMode
|
class:nightMode
|
||||||
class="image-handle-control image-handle-control-se is-active"
|
class="image-handle-control image-handle-control-se is-active"
|
||||||
|
@ -187,6 +180,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
left: -5px;
|
left: -5px;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
border-right: none;
|
border-right: none;
|
||||||
|
|
||||||
|
&.is-active {
|
||||||
|
cursor: sw-resize;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-handle-control-se {
|
.image-handle-control-se {
|
||||||
|
|
Loading…
Reference in a new issue