Commit graph

2079 commits

Author SHA1 Message Date
Mihai Varga
67e183105f This places the controls above the map (in another div)
I have no experience with css but this works
TODO: needs proper fixing
2015-04-03 12:01:02 +03:00
Mihai Varga
61210a92a3 Initialize the outer div (container) in map's constructor
This will be later used to get the center of the viewspace
2015-04-02 19:36:22 +03:00
Mihai Varga
48c92dd555 Document is no longer dragable and scrollable
Mouse scrolling is now actualy scrolling instead of zooming
2015-04-01 13:10:17 +03:00
Mihai Varga
3da367096d Don't request invalid tiles 2015-04-01 11:24:31 +03:00
Mihai Varga
0811e2eb99 Use L.DomUtil instead of direct element access 2015-04-01 11:12:45 +03:00
Mihai Varga
d1fe237992 Update document info only if given status is different
Document info = height and width
2015-03-31 19:55:37 +03:00
Mihai Varga
283b35ab6e This fixes the loading problem
The document now loads and zooms smoothly
2015-03-31 19:51:42 +03:00
Mihai Varga
c22280f47c Removed unnecessary map._update() call 2015-03-30 19:22:17 +03:00
Mihai Varga
04403ff782 Update div dimension when zooming for the scrollbar 2015-03-30 19:21:21 +03:00
Mihai Varga
4944fcc57d Detached controls from the map and added scrollbars
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
2015-03-30 19:20:04 +03:00
Mihai Varga
5d6cbc4ed8 Switched the order in which docPixelLimits is created 2015-03-30 19:18:58 +03:00
Mihai Varga
c6ecfeaf8a Adapt document loading command to new protocol 2015-03-30 19:16:50 +03:00
Mihai Varga
b138c2431d Tiles are cached on the client side
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
2015-03-24 16:26:40 +02:00
Tor Lillqvist
32de8661bc Mention how to run npm without root 2015-03-24 13:15:43 +02:00
Mihai Varga
3b2c3a69df Mentioned about 'jake lint' in README 2015-03-23 19:37:42 +02:00
Mihai Varga
dc97c7eabd Fixed some lintjs coding style errors 2015-03-23 19:36:01 +02:00
Mihai Varga
624873cf47 Added instructions on how to use loleaflet + an example 2015-03-23 19:24:39 +02:00
Mihai Varga
31f5141c46 Added zoom functionality
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.
2015-03-23 19:05:25 +02:00
Mihai Varga
5db22c1962 Temporary dded zoom control back 2015-03-23 18:57:23 +02:00
Mihai Varga
3921903e8e MaxBounds are set automatically based on the size specified by loolwsd 2015-03-20 10:05:22 +02:00
Mihai Varga
fe757bfc12 Workaround for Leaflet issue #3320 2015-03-20 10:02:58 +02:00
Mihai Varga
aa5d7c9ccc Fixed tiles interleaving problem + allowed static layers to be added
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
2015-03-19 19:08:29 +02:00
Mihai Varga
0c5b654194 Tiles are now loaded from a loolwsd server
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
2015-03-16 17:46:20 +02:00
Mihai Varga
a8075b8250 Added websockets to the Map object
'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.
2015-03-16 17:38:19 +02:00
Mihai Varga
2213e76a32 Removed zoom control and attribution display 2015-03-16 17:33:07 +02:00
Mihai Varga
87dc6f5b8f Set LF line terminator 2015-03-09 15:58:37 +02:00
Mihai Varga
3d64e7764f Readme that explains how to build and states code convetions 2015-03-09 15:54:27 +02:00
Mihai Varga
699cab4ced Removed initial README and contributing guide 2015-03-09 15:54:01 +02:00
Mihai Varga
bb6fd2206a Unmodified Leaflet
Checkout date: 09/03/2015
HEAD: a92c8a3c21f8d580de2dfd1e937ea90db76787b6
2015-03-09 12:16:17 +02:00