Ding - Floor plan API

Ding is a Floor plan API. Its designed to be similar to the Google Maps API. To use this save a copy of ding.js, and call the constructor. You can the switch modes (Edit, Notes, and View) by calling the appropriate function.

b_building Object

b_building(div)
Constructor: Creates the building in the element passed to it.
b_building.createBox(x,y,w,h)
Creates an area of floor.
b_building.createNote(x,y,w,h)
Creates a note. Its displayed as a red box with an exclaimation icon.
b_building.rebuildDisplayCache()
Rebuild the cached display information.
b_building.draw()
Draw the contents of the display cache to the canvas.
b_building.setEditState()
Switch to edit mode. Allows the user to edit the floor plan of the building.
b_building.setNoteState()
Switch to notes mode. Allows the user to add notes to the building.
b_building.setViewState()
Switch to view mode. Allows the user to pan the view.