d-bl / GroundForge

Bobbin Lace Diagrams : threads from pairs
https://d-bl.github.io/GroundForge/
GNU General Public License v3.0
12 stars 7 forks source link

Misbehaving resize buttons on Chrome #203

Open jo-pol opened 3 years ago

jo-pol commented 3 years ago

Diagram panels have resize buttons intended for touch devices that lack the hot corner at the right bottom. image

These resize buttons are misbehaving on Google-Chrome on desk/lap-top devices. Tried Chrome on a few mobile devices via browserstack.com, so far none showed the same misbehavior. Until solved, the workaround is the right bottom corner.

Observed with version 94.0.4606.81 on both Windows (10 build 19043.1288) and Mac (Big Sur 11.6): After applying a Droste wand (thread diagram as pair diagram) the increase button increases the width but decreases the height. The decrease button decreases in both directions but at different speeds than the increase. On Windows 10 only the Droste diagrams are affected, on Mac the first thread diagram is also affected.

jo-pol commented 3 years ago

Saved a local copy of the page and added some logging before line 170

  console.log(`${container.attr("id")} ${orientation} ${units} ${scaleValue} old=${oldValue} new=${newValue}`)

https://github.com/d-bl/GroundForge/blob/3a3d93b54638ef71931095f65d346ae8d1223272/docs/js/tiles.js#L361-L371

The screenshot shows logging of firefox on the right and chrome on the left. The actions were: increase twice, decrease twice, wand, increase twice, decrease twice. Chrome comes with not expected old values after the wand. image

Side note: chrome also logs tons of errors (on page load and the wand) not shown by firefox. Not sure firefox just swallows these. image

jo-pol commented 3 years ago

Thread diagrams produce the NaN at https://github.com/d-bl/GroundForge/blob/3a3d93b54638ef71931095f65d346ae8d1223272/docs/js/tiles.js#L424 This can be debugged with scala unit tests. Not sure fixing the NaN-s also fixes the resize problem.