vue-croppa icon indicating copy to clipboard operation
vue-croppa copied to clipboard

apply removeButtonSize to position when usable it

Open Angeart opened this issue 6 years ago • 4 comments

case

the remove button is be funny position when canvas size is so large.

fix method

apply removeButtonSize property to it's position

Angeart avatar Sep 14 '18 09:09 Angeart

@zhanziyang plz watch it

Angeart avatar Sep 14 '18 09:09 Angeart

Sorry, not sure what you are trying to do 😕

zhanziyang avatar Sep 21 '18 07:09 zhanziyang

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.

Angeart avatar Sep 21 '18 12:09 Angeart

@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

twbagustin avatar Oct 01 '18 21:10 twbagustin