vue-picture-input icon indicating copy to clipboard operation
vue-picture-input copied to clipboard

Should use parseInt() for zIndex assignment

Open ugurarici opened this issue 6 years ago • 0 comments

When assigning zIndex values component uses zIndex+1 and zIndex+2

When use component without bindig zIndex value, it is not adding 1 and 2 to an integer, because it is a string.

<picture-input zIndex="9"> Now it is a string, so "9"+1 returns 91, but we want it to be 10.

You have to bind it to keep it as a Number on component

<picture-input :zIndex="9"> Now it is binded as integer and 9+1 returns 10, not 91 :)

In short: We should use parseInt(zIndex)+1 for zIndex assignments :)

ugurarici avatar Feb 01 '19 14:02 ugurarici