The "controls" div holds map controls suchs as the Zoom button and
it's separated from the map in order to have the controls on the top
of the page all the time.
The "document-container" div is the actual display of the document, is
what the user sees and it should be no larger than the screen size.
The "map" div is the actual document and it has the document's size
and width, this being inside the smaller "document-container" will
cause the content to overflow, creating scrollbars
Updated the removeTile method to just mark the tile as
not current and the set _update method not to 'hide'
(set opacity to 0) tiles from the current zoom level
The document can be zoomed in an out. Each zoom level corresponds
to a 20% increase or decrease in tile dimmension (in twips).
Zooming doesn't work well yet. Tiles are removed and readded to
many times and it looks bad. Also the zooming center has to be fixed.
Tiles are now correctly displayed.
Layers that request tiles from a socket connection need to specify
the 'useSocket: true' option. This way layers that do not require an
internet connection can be added (like a grid, ruler, etc.).
I've also fixed some coding style problems suggested by lintjs
the '_addTile' method now also handles tiles comming from a websocket.
Tiles are no longer added in one batch as they are added when received.
Added twip to pixel and pixel to twip convertor methods.
1 twip = 15 px
'onopen' and 'onmessage' events are handled
in src/layer/tile/TileLayer.js
Tile data is received as an ArrayBuffer which contains a string message
followed by a new line and then by the actual PNG data. The PNG data
is encoded in base-64 in order to be displayed.