nipplejs icon indicating copy to clipboard operation
nipplejs copied to clipboard

Add the possibility to set a unit for the size of the stick

Open erbizard opened this issue 5 years ago • 2 comments

Hi,

I've encountered a problem after using your lib on desktop / mobile. The problem is the "px" size is not responsive at all so the stick doesn't react the same on all platforms.

I've changed the lib to add a unit / val in the size parameter to allow any unit on the size of the sticks.

The major problem of this update is, if you release this, you need to update major, cause old code with old size isn't supported. and with the typescript I can't make a retro-compatibility.

Regards, Arthur Rouet

erbizard avatar Oct 30 '19 09:10 erbizard

Hi there, thanks for this.

I've encountered a problem after using your lib on desktop / mobile.

Do you have an example somewhere I could check?

yoannmoinet avatar Oct 31 '19 08:10 yoannmoinet

The problem is the "responsiveness" When you are forced to use px, you can't really make a stick with the same size on every platforms, if you want +-10% on as 1920 * 1080 the size is 190px, but when you test on a mobile 640*360 190 px is like quarter of the screen, so it can be problematic. And even between different mobiles, there is so many resolution that you can't really have a front that render exactly the same on all mobile.

erbizard avatar Oct 31 '19 09:10 erbizard