Gulix / geckos

An online Card Editor with Templates
http://gulix.github.io/geckos/
Other
49 stars 18 forks source link

Fields not generated in correct order on the canvas #168

Closed Gulix closed 7 years ago

Gulix commented 7 years ago

When using Chrome and the online version of the editor, it appears that images requiring a longer load can be put "on top" when some other objects should be drawn instead.

Two solutions : maybe it's a known bug from fabricJS, and the library needs an update ? Or maybe using a solid z-index in the generated code should help (not necessarily in the template, but added in a second pass).

image

Gulix commented 7 years ago

Added a zindex property to canvas fields, in order to sort the fields before generating the JSON. By default, zindex is 1. Needs to be documented.