vue-croppa
vue-croppa copied to clipboard
apply removeButtonSize to position when usable it
case
the remove button is be funny position when canvas size is so large.
fix method
apply removeButtonSize
property to it's position
@zhanziyang plz watch it
Sorry, not sure what you are trying to do 😕
ah, plz see following codepen. https://codepen.io/shinomiya_ag/pen/gdEGGa
Set Small Number to remove-button-size
when canvas is so big.
"Remove Button" position is in a strange position.
I fix it.
@zhanziyang I was about to submit a similar PR, when you use say width=1920
, the remove button is quite big, but luckily you have an undocumented "removeButtonSize" var to use, so you can set button size fixed to say width:30px! The thing is that when you use this "removeButtonSize" var (which is not documented thus maybe not fully supported), the button's style top
and right
properties are not updated!
Relevant code:
<svg class="icon icon-remove"
(...)
:style="`top: -${height/40}px; right: -${width/40}px`"
(...)
:width="removeButtonSize || width/10"
:height="removeButtonSize || width/10">
@Angeart does the tricky of correctly supporting that again, not documented, variable, TODO document it :P