wikitree / wikitree-dynamic-tree

Dynamically generated and browsed graphical family tree
MIT License
26 stars 20 forks source link

Moving the Dynamic Tree around does not display cleanly on iOS devices. #42

Open jmegenealogy opened 2 years ago

jmegenealogy commented 2 years ago

From G2G:

In Safari on iOS 16.0 or iPadOS 15.7, if you slide your finger to move the display, it smears (image from iPhone, but iPad is similar).

image

This may be an issue with all touch-screen devices.

faceless2 commented 2 weeks ago

This is happening because the scrolling is done by modifying the transform property on the SVG.

A solution is to leave the transform property fixed, put the SVG in a <div style="overflow:scroll"> then adjust the scrollLeft and scrollTop on the div element to scroll. This is much less work for the browser to relayout, and definitely better tested too.