You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gl-draw, as is, is virtually unuseable. However, its a great test-case for gl-js on-the-fly rendering capabilities. That being said, there many optimizations in the javascript here that can ameliorate this.
To do:
reduce calls to Immutable.toJS and Immutable.fromJS
initialize all object members in constructor functions
mousedown on feature followed by onmousemove event for square geometry
Below is a snapshot of a single onmousemove event
translate and update could use work but even then the bulk of the work is upstream (gl-js). In translate, its project and unproject. In update its render (which calls setData)
gl-draw, as is, is virtually unuseable. However, its a great test-case for gl-js on-the-fly rendering capabilities. That being said, there many optimizations in the javascript here that can ameliorate this.
To do:
Immutable.toJS
andImmutable.fromJS
make vertex finding for vertex drag less robust and less expensivehttps://github.com/mapbox/gl-draw/blob/dev-pages/src/handlers/square.js#L97-L100Math.sqrt(Math.pow(v.get(0) - coords[0], 2) + Math.pow(v.get(1) - coords[1], 2))
=>Math.abs(v.get(0) - coords[0]) + Math.abs(v.get(1) - coords[1])
Upstream:
The text was updated successfully, but these errors were encountered: