Jump to: navigation, search

Canvas SVG Parser

608 bytes added, 23:38, 7 November 2013
Complex Instruments
Bottom line being: 1) less code, 2) less typing, 3) better maintainable, 4) more future-proof
To port existing code (such as the 744 EICAS/PFD) accordingly, here's what you'll want to do:
* make sure that the SVG element's ID is indeed unique, also within the namespace of your hash/class, to avoid naming conflicts (if the ID is not unique, either introduce a sub namespace/hash, or simply open the SVG file and rename it)
* search/replace occurences of the old variable name and prepend a me. prefix, e.g. '''altitudeFt''' becomes '''me.altitudeFt'''
* remove/comment the free-standing '''var altitudeFt = {};''' line and replace it by adding the SVG element ID to the vector of the foreach loop

Navigation menu