This second demo shows how Leaflet.ShadowWrap fixes things. The rectangle wraps across correctly across the dateline, and you can pan across it without shapes mysteriously disappearing. You can now draw over the dateline without your shapes disappearing, and edit without things going haywire.

Compare to: demo 1.