Mihai Varga
f312736e18
Skip fadeAnimation rather than disabling it
...
Disabling it might cancel currently fading in tiles
e.g. when scrolling we want fadeAnimation but if a tile invalidation
occurs that would completly disble fadeAnimation and new tiles requested
by scrolling will not load
2015-07-01 11:13:14 +03:00
Mihai Varga
d0586f9267
Maintain an invalidation count for each tile
...
Count how many times a tile has been invalidated.
For each inalidation increase the counter and for each arrival
of the new tile decrease it.
Only cache tiles with the invalidation count equal to 0 because
when zooming, we might cancel previous requests and the tiles in the
old zoom layer are no longer valid
2015-07-01 10:47:05 +03:00
Mihai Varga
d45a967e8d
Disable animFade when zooming + cache tiles from other zoom levels
2015-06-30 20:23:07 +03:00
Mihai Varga
fca2f030fe
Just mention that this will be the future toolbar
2015-06-30 15:05:32 +03:00
Mihai Varga
842c50d163
Update cursor on zoomend
2015-06-30 12:56:47 +03:00
Mihai Varga
d0f420bc81
Added a set of keys that need to be handled on the keydown event
2015-06-30 11:34:24 +03:00
Mihai Varga
1714df5f9e
Scroll to cursor position if it's out of the viewing area
2015-06-29 19:02:58 +03:00
Mihai Varga
1acd0ab78d
Ignore scroll event when zooming
...
That event is fired because of container resize.
This time I've added a method that resets the ignoreScroll flag
after 200ms if it's not reseted until then.
2015-06-29 18:42:20 +03:00
Mihai Varga
5ccda335ef
Start in edit mode by specifying it in the URL
...
http://.../host=host_address&file_path=file_path&edit=true
2015-06-29 16:43:47 +03:00
Mihai Varga
cfa8912063
Start loleaflet in viewing mode
2015-06-29 15:54:25 +03:00
Mihai Varga
96aa6e2048
Restore focus to textArea after dragging handle
2015-06-29 15:17:43 +03:00
Mihai Varga
2e5e63724e
Restored tile cache and removed invalid tiles from it
2015-06-29 12:45:14 +03:00
Mihai Varga
0c1a0b1b12
Fix firefox backspace after handling it for chrome
2015-06-29 12:14:26 +03:00
Mihai Varga
bed964c00d
Fix backspace input on chrome
2015-06-29 11:37:02 +03:00
Mihai Varga
a32278cb2b
Don't send 2 clicks before sending dblclick
...
Mouse events are now put in a queue. If within 250ms from the first
click arrives another, it's a double click, the previos and the current
clicks are canceled and a dblclick command is sent instead.
2015-06-29 10:54:32 +03:00
Henry Castro
ec2de8f46e
loleaflet: Disable mouse when dragging text.
2015-06-29 00:27:00 -04:00
Henry Castro
fa3b208b7f
loleaflet: Selecting table does not reset handler.
2015-06-29 00:18:04 -04:00
Henry Castro
d25ed90b1e
loleaflet: Disable mouse when dragging image.
2015-06-27 19:38:31 -04:00
Jan Holesovsky
551672c08d
Further tweaks to the cursor position.
2015-06-27 00:07:35 +02:00
Henry Castro
acfad75fc9
loleaflet: Fix cursor visible when changing part.
2015-06-26 15:38:58 -04:00
Mihai Varga
fe4ff86335
Temporarily disable client cache
...
Until we invalidate tiles from all zoom levels
2015-06-26 19:29:02 +03:00
Mihai Varga
9a3e71bad8
Keyboard input is handled in a hidden textarea
...
We now have a hidden text area where the user's input actually goes,
but it also fires events that are caught by leaflet and are sent
to the server
2015-06-26 19:20:21 +03:00
Mihai Varga
bee60c69e8
Move the cursor to the left by half its size
2015-06-26 14:34:18 +03:00
Mihai Varga
e901c6fe34
Set marker not clickable during mouse selection
2015-06-26 12:43:57 +03:00
Mihai Varga
56418272ca
Fixed keyCode on chrome
2015-06-26 12:04:04 +03:00
Mihai Varga
3dffe1ed62
This should handle doc resize caused by page deletion
2015-06-26 10:11:57 +03:00
Henry Castro
38133c7886
loleaflet: Swap selection handler.
...
In order to get continuous selection, the handlers are swapped if the
distance from cursor to handlers cross over.
2015-06-25 23:29:58 -04:00
Henry Castro
392a4bbb85
loleaflet: Reset drag flag when no selection.
2015-06-25 20:36:53 -04:00
Henry Castro
48d7af6378
loleaflet: Avoid mouse click on blinking cursor.
2015-06-25 16:37:57 -04:00
Jan Holesovsky
be6b89d1aa
More tweaks wrt. cursor blinking.
2015-06-25 18:31:33 +02:00
Mihai Varga
32d6f4fc5f
Detect document size changes
2015-06-25 19:24:57 +03:00
Henry Castro
fa89bbd55b
loleaflet: Set cursor blinking linear
2015-06-25 12:15:38 -04:00
Mihai Varga
7858402ea4
Removed hungarian notation
2015-06-25 16:15:04 +03:00
Mihai Varga
f5c8ec852d
Fixed eslint errors in Control.EditView.js
2015-06-25 15:50:53 +03:00
Mihai Varga
a72d66f08b
Fixed eslint errors in Control.Parts.js
2015-06-25 15:48:51 +03:00
Mihai Varga
fa3a5ab0c1
Fixed eslint errors in Control.Search
2015-06-25 15:36:02 +03:00
Mihai Varga
7be20044be
Fixed eslint errors in Control.StatusIndicator.js
2015-06-25 15:25:46 +03:00
Mihai Varga
d85b853e33
Fixed eslint errors in Cursor.js
2015-06-25 15:24:41 +03:00
Mihai Varga
a04a0c4a9f
Fixed eslint errors in GridLayer.js
2015-06-25 15:23:03 +03:00
Mihai Varga
64f6e5647d
Fixed eslint errors in TileLayer.js
2015-06-25 15:16:14 +03:00
Mihai Varga
dfbc34af2f
Fix eslint errors in Map.js
2015-06-25 14:19:06 +03:00
Mihai Varga
2f6dd8a3e7
Ignore src/scrollbar when running jake lint
2015-06-25 13:49:51 +03:00
Mihai Varga
e9691e6557
Enable fadeAnimated only when zooming/scrolling
2015-06-25 13:25:03 +03:00
Mihai Varga
d977411f0c
Request selection content after selection and a time delta
2015-06-25 13:09:38 +03:00
Mihai Varga
bc65f57a54
tile invalidation: don't disable animFrame
...
This affects zooming. Instead just skip the method that calls
the animation frame
2015-06-25 12:35:31 +03:00
Mihai Varga
4b996b644d
Copy event handler
...
I implemented the solution found here
http://stackoverflow.com/questions/17527870/how-does-trello-access-the-users-clipboard#answer-17528590
which basically creates an invisible text area, sets focus to it,
selects the text, enables firing the oncopy then focus is restored to
the document.
2015-06-24 13:32:56 +03:00
Mihai Varga
1e5269a467
Clicking on a selection should deselect it
2015-06-23 14:56:03 +03:00
Mihai Varga
e8d5cbbb1e
Replaced 'dragging' with 'isDragged' because 'dragging' is already used
2015-06-23 14:23:35 +03:00
Mihai Varga
b5cbd467d9
Cancel tile request for tiles out of the visible area
...
This provides a better scrolling experience
When a large enough number of tiles have been requested we know that
they will cover the whole viewing area so we're able to cancel the
previous (not yet fulfilled) requests
2015-06-23 13:44:35 +03:00
Mihai Varga
d2124f3078
Fixed invalid tiles bounds
2015-06-22 17:48:05 +03:00
Mihai Varga
c5e950bb41
Reverted ecfe65b37f
2015-06-22 17:45:43 +03:00
Mihai Varga
9c73ddbd08
Reverted 73974f7397
2015-06-22 17:45:10 +03:00
Mihai Varga
37b79bb643
loleaflet: update selection when dragging the selection handle
2015-06-22 11:37:39 +03:00
Henry Castro
c157e732f9
loleaflet: Add keydown event.
2015-06-19 09:50:24 -04:00
Henry Castro
dbc369c445
loleaflet: Use keymap to convert UNO key codes.
2015-06-19 09:32:27 -04:00
Henry Castro
bf17fde478
loleaflet: grow / shrink the text selection.
2015-06-18 21:10:38 -04:00
Henry Castro
f9b012ae45
loleaflet: grow / shrink the graphic selection.
2015-06-17 20:59:33 -04:00
Henry Castro
ac58e56de2
loleaflet: Disable Map keys when editing documents.
...
When the document is in editing mode, the default map
keys for zooming is disabled.
2015-06-15 22:12:30 -04:00
Henry Castro
d170ee598e
loleaflet: Add graphics selection.
2015-06-15 20:44:11 -04:00
Henry Castro
cceb663a64
loleaflet: keyup != keypress different keycodes
...
keypress and keyup are different keycodes values
and they differ some browser, keypress is the right
charcode and keycode values.
2015-06-14 19:16:04 -04:00
Henry Castro
21035bf438
loleaflet: Mimic gtktiledviewer editing
...
gtktiledviewer is the reference code to enable
editing for calc, writer and impress.
2015-06-11 19:48:08 -04:00
Henry Castro
ba6663d445
loleaflet: Added onkeyup event.
2015-06-10 21:59:09 -04:00
Jan Holesovsky
73974f7397
Fix JavaScript part of the tiles invalidation.
...
Now it is possible to type in in some cases, but for the full functionality,
tuning together with the server is necessary.
2015-06-10 18:58:34 +02:00
Jan Holesovsky
ecfe65b37f
Don't actually create the tiles until after we get them from the server.
...
When a tile is requested, don't create anything yet, just send the request.
Create the tile after we actually get it from the server.
This is in preparation for the cancellation of the tiles requests.
2015-06-10 18:13:34 +02:00
Henry Castro
007ebda88c
Fixed cursor position.
2015-06-06 18:17:37 -04:00
Jan Holesovsky
6df02b89d2
Enable editing in master again.
2015-06-05 16:03:06 +02:00
Tor Lillqvist
391d17831d
Bump minor number in this master branch
2015-06-05 16:28:49 +03:00
Tor Lillqvist
28d28dd67c
Bump version after tarball
2015-06-04 14:20:11 +03:00
Tor Lillqvist
41c5359d82
Bump version for tarball
2015-06-04 14:19:48 +03:00
Henry Castro
43425c406d
The keycode RETURN it is converted to click.
...
The keypress and keycode = 13 are converted to click event,
so Calc Application does not receive keypress RETURN, It is needed
to commit changes into cell.
2015-06-02 23:49:51 -04:00
Henry Castro
87ea674177
Convert Javascript keycode to UNO keycode
2015-06-02 23:43:18 -04:00
Henry Castro
78764623d8
Added blinking cursor
2015-06-02 23:38:00 -04:00
Henry Castro
afa848cf79
Disable fade animation, it does not work Calc.
...
When tile invalidation the fade animation set opacity to 0
so the tile is gray out.
2015-06-02 23:13:01 -04:00
Jan Holesovsky
def78817b0
TiledLayer should not clear the search bar's not found indication.
2015-05-31 21:47:15 +02:00
Jan Holesovsky
4342c5c9fb
Don't switch parts when we are in the correct one already.
2015-05-31 14:02:29 +02:00
Jan Holesovsky
0f9e24f77d
Disable invalidation for the moment, breaks slides.
2015-05-31 00:38:22 +02:00
Jan Holesovsky
6b743655cc
Small addition.
2015-05-31 00:37:20 +02:00
Jan Holesovsky
29ba14178e
Kill _abortLoading, causes loss of tiles in various scenarios.
...
loleaflet only triggers the loading of the tile, and the tile comes sooner or
later whatever we do, so the idea of aborting the loading does not work until
we have server support for that anyway - let's just kill that for now.
2015-05-30 23:34:32 +02:00
Jan Holesovsky
128bfcec10
Never ignore scroll.
...
After 'make clear-cache', sometimes causes losing scroll events (the user
moves the scrollbar, but the document does not move).
2015-05-30 04:12:03 +02:00
Mihai Varga
865f23d4e7
Use SearchItem.SearchStartPoint
2015-05-29 14:18:39 +03:00
Tor Lillqvist
7721409594
Post-release bump to 1.0.9
2015-05-29 09:41:25 +03:00
Tor Lillqvist
96e0b433a7
Bump version to 1.0.8 for tarball
2015-05-29 09:40:54 +03:00
Mihai Varga
2fa440c18f
Status indicator control
2015-05-28 18:43:29 +03:00
Mihai Varga
1d34f8f0a8
Set pointer cursor in viewmode
2015-05-28 17:43:53 +03:00
Mihai Varga
d8dd709377
setpart command handler
2015-05-28 17:22:45 +03:00
Henry Castro
e974f7c98c
Fixed EMPTY invalidattiles
2015-05-28 09:36:52 -04:00
Tor Lillqvist
6968bd1c3c
This should obviously be noarch
2015-05-28 11:19:20 +03:00
Mihai Varga
f999c337b9
Better differentiate commands, status vs statusindicator
2015-05-28 11:02:12 +03:00
Miklos Vajna
36c94140ef
loleaflet: document ~/.npmrc prefix setting
2015-05-27 16:09:04 +02:00
Tor Lillqvist
beb321d142
Revert attempts at sanity
2015-05-27 16:33:49 +03:00
Tor Lillqvist
6b91320f69
Intermediate non-working attempt at sanity
2015-05-27 16:29:57 +03:00
Tor Lillqvist
85e98d5231
Don't put superfluous stuff in the tarball, and bump version to 1.0.2
2015-05-27 14:58:41 +03:00
Henry Castro
6742cd8046
Capture invalidatetiles when keys are pressed
...
There is a problem with fade and opacity. they
are set to 0.
2015-05-26 23:51:52 -04:00
Henry Castro
9287074b75
Added cursor visible and invalidate cursor
2015-05-26 20:52:35 -04:00
Henry Castro
8d094fbf3f
Added keypress function to send keys
2015-05-26 20:37:11 -04:00
Mihai Varga
bd642c3d37
Make the view/edit text in the control unselectable
2015-05-26 20:56:27 +03:00
Mihai Varga
22232e070f
Dragging will be handled in the js code
2015-05-26 20:56:27 +03:00
Mihai Varga
77b8e0d126
Edit/View switching handler
2015-05-26 20:56:27 +03:00
Mihai Varga
7b79f0edd5
Control for switching between viewing and editing mode
2015-05-26 20:56:27 +03:00
Jan Holesovsky
bc02be9812
Don't cycle the parts, stop at 0 / max.
2015-05-25 18:43:18 +02:00
Mihai Varga
29d4296d12
Disable prev/next part buttons for the first/last part
2015-05-25 17:52:36 +03:00
Mihai Varga
57cb4fe243
Prune tiles after switching parts
2015-05-25 17:36:18 +03:00
Mihai Varga
bcdf048d6d
Merge adjacent selection rectangles into a single polygon
...
+ the document is scrolled to the average center of the rectangles
if that is out of the viewing area
2015-05-25 16:54:29 +03:00
Mihai Varga
139bae53c1
Fixed the incorrect tile rendering after zooming problem
...
Leaflet originally discarded tiles from different zoom levels
and I initially thought setting the opacity to 0 will be enough
and this way tiles will remain in cache.
But this does not work so tiles are now removed from the dom tree
and added in a cache to be later reused
2015-05-22 14:35:06 +03:00
Tor Lillqvist
95b25f2de7
Add a spec file for leaflet to package it
...
Ugly hack.
2015-05-20 20:46:12 +03:00
Mihai Varga
a59dd5d278
Forgot to remove debugging output
2015-05-20 18:51:15 +03:00
Mihai Varga
19e94da931
Handle 'searchnotfound' command
2015-05-20 16:54:40 +03:00
Mihai Varga
531cccc026
Mouse handlers
...
It works for: click, dblclick and dragging
2015-05-20 16:54:40 +03:00
Tor Lillqvist
12e0a880f6
Revert "We want 'make dist' to actually create a *source* tarball"
...
Nah. Trying to package this JS crack in RPM so that it is buildable from
source on openSUSE does not seem easy. Let's just package the deliverables for
now. Those who want to look at sources can use git.
This reverts commit 434550f352
.
2015-05-20 16:00:47 +03:00
Tor Lillqvist
434550f352
We want 'make dist' to actually create a *source* tarball
...
Use 'git archive' of the loleaflet subdirectory.
2015-05-20 14:59:18 +03:00
Tor Lillqvist
873e7c5102
Add a Makefile to create a tarball
...
Not sure whether this makes sense, but for now...
2015-05-19 14:29:55 +03:00
Mihai Varga
c2f0b5b17d
Pressing enter always searcheas forward
2015-05-18 18:03:26 +03:00
Mihai Varga
51bbdd91ed
Prevent document from jumping when zooming
2015-05-18 17:40:55 +03:00
Mihai Varga
a4391c1017
Fix for stack size limit exceded
2015-05-18 16:10:24 +03:00
Mihai Varga
428f6dbe6f
Match the background color with what LOkit provides
2015-05-18 15:34:21 +03:00
Mihai Varga
40552d424c
Clear selections when the search string is modified
2015-05-18 10:37:20 +03:00
Mihai Varga
249d8fdaf6
Finished the parts control
2015-05-18 10:30:51 +03:00
Mihai Varga
e55d216708
No search result -> the search bar flashes red
...
This still needs work because the search bar will flash
if the user clicks on the map and doesn't select anything.
This will need a proper 'no-result-found' message from the server
2015-05-18 09:15:23 +03:00
Mihai Varga
b482dabe37
Alert when there is a connection error
2015-05-15 18:35:05 +03:00
Mihai Varga
cb33fd5035
Added selection border and set the selection color to: #43ACE8
2015-05-15 17:00:43 +03:00
Mihai Varga
94396cf87b
Searh next/prev searches the latest enterd value
2015-05-15 16:19:59 +03:00
Mihai Varga
40172d3dd5
'Part' command is now parsed and interpreted
2015-05-15 15:14:02 +03:00
Mihai Varga
ed5491921a
Update scrollbars on window resize
2015-05-15 14:37:14 +03:00
Mihai Varga
fe40e3d592
Less space between the toolbar and the document
2015-05-15 13:07:05 +03:00
Mihai Varga
a3cc8784fb
Text mouse cursor (editing cursor)
2015-05-15 13:06:43 +03:00
Mihai Varga
ab86440cb2
Prevent img drawing on mozilla
2015-05-15 12:46:01 +03:00
Mihai Varga
c057a42063
Working text selection by mouse dragging
2015-05-15 12:12:11 +03:00
Mihai Varga
c2c379ac69
Removed unnecessary variables
2015-05-15 12:12:11 +03:00
Mihai Varga
906e9e28fc
Search scrolls to result if it's out of the viewing area
2015-05-13 12:39:57 +03:00
Mihai Varga
5e4225c860
In fact, it is better not to prefix the url
2015-05-13 12:05:13 +03:00
Mihai Varga
04d2b531a1
Check if file:// is added in the url
2015-05-13 12:01:10 +03:00
Mihai Varga
0a7e20e851
Encode spaces in the URL
2015-05-13 11:54:12 +03:00
Mihai Varga
124de292d1
Updated the text selection handler
...
And also removed an unnecessary method
2015-05-13 11:17:34 +03:00
Mihai Varga
e4b1624d2b
Updated the search bar to send the correct command to the server
2015-05-13 11:17:34 +03:00
Mihai Varga
bc23033537
Fixed tiwps->latlng and backwards conversion
2015-05-13 11:17:33 +03:00
Mihai Varga
d78642806a
Removed URL tiles specific methods
2015-05-11 17:55:38 +03:00
Mihai Varga
47e301cc92
Parts command from the server is parsed but not yet interpreted
2015-05-11 17:05:03 +03:00
Mihai Varga
4c6d87231c
Parts control for switching between parts
2015-05-11 17:05:03 +03:00
Mihai Varga
90b3b32bbc
Renamed method to _parseServerCmd
2015-05-11 17:05:03 +03:00
Mihai Varga
13582c7f04
Fixed typo
2015-05-11 17:05:03 +03:00
Mihai Varga
febaaa1900
Mouse event handlers for selection
2015-05-08 15:24:47 +03:00
Mihai Varga
1858147801
Twips to latlng and reverse methods
2015-05-08 15:24:26 +03:00
Mihai Varga
affdbc6ff1
Added search command (from the server) handler
2015-05-08 13:58:13 +03:00
Mihai Varga
5dabc12660
Search bar buttons are updated based on the current search index
2015-05-08 13:56:28 +03:00
Mihai Varga
c622852514
Removed the Draw plugin interface
...
We don't actually need this plugin because the server
dictates how the selection will work.
Will remove the whole plugin when I'm sure this won't have other
applications
2015-05-08 11:44:37 +03:00
Mihai Varga
5bde4775f6
Added cancel search button + search bar sends propper events
2015-05-08 11:10:48 +03:00
Tor Lillqvist
d3acdbb225
String::startsWith is Firefox-only it seems
2015-05-06 18:41:09 +03:00
Mihai Varga
15a889db91
Search bar implemented as a leaflet Control
...
It is not ready yet, buttons' functionality and the search
functionality is to be added
2015-05-06 12:39:03 +03:00
Mihai Varga
57a2663cb9
Search bar bax with prev and next buttons
2015-05-06 10:41:26 +03:00
Mihai Varga
1b5f9b1f22
Readme update that describes how to open a doc
2015-05-06 10:08:56 +03:00
Mihai Varga
bc5bee6751
Smoother scroll without intertia
2015-05-06 09:44:32 +03:00
Mihai Varga
b9351c6fed
Forgot to replace evt.data with textMsg
2015-05-06 09:37:44 +03:00
Mihai Varga
6c6f8c29de
Document file path and host are encoded in the url
...
Usage:
http://web-page?file_path=/PATH/TO/DOC&host=ws://localhost:9980
2015-05-06 09:35:22 +03:00
Mihai Varga
22276e7975
Better msg reading method that allows adding new types of msgs
2015-05-04 18:36:47 +03:00
Mihai Varga
4b31303cc0
Let leaflet track window resize
2015-05-04 18:02:32 +03:00
Mihai Varga
55508c6680
Enabled doc. nagivation by keyboard and mousewheel
...
Scrolling now works from the arrowkeys, pgUp, pgDown
Home and End buttons and also from the mouseWheel
TODO update the compressed file
2015-05-04 16:29:23 +03:00
Mihai Varga
bc29447b86
Removed trailing whitespaces from scrollbar code
2015-05-04 16:26:02 +03:00
Mihai Varga
7d3458eb5e
This fixes a bug that's triggered when zooming at document's end
2015-05-04 11:20:36 +03:00
Mihai Varga
a03e9f2e73
Updated readme to reflect the new changes
2015-05-04 11:20:36 +03:00
Mihai Varga
fa15ef1b20
Updated the example document
2015-05-04 11:20:36 +03:00
Mihai Varga
320e094a47
Scroll event handlers + document centering
...
The document is centered by setting map's maxBounds
There are 2 types of scroll events:
- one generated during scrolling which actually pan's the map
- one generated when scrolling stops, this is used to keep track of
scrolling events
When the document is zoomed, the scrollbars are placed at the right
offset as the document's dimension changes and this is done with
the scrollTo method after temporarily disabling the event listener.
2015-05-04 11:20:36 +03:00
Mihai Varga
f0502879b4
New containers + restored some methods implementations to their original
...
Added scrollContainer - the div that will get scrollbars
mockDoc - a mock document div of size equal to the document's, which
will cause the appearance of scrollbars
The size of the map now equals the visible area, so I've restored
the methods to work on this new size
2015-05-04 11:20:36 +03:00
Mihai Varga
c788ab8886
Event handlers for the new scrollbars
2015-05-04 11:20:36 +03:00
Mihai Varga
bee74de059
CSS updates for the new div elements
2015-05-04 11:20:36 +03:00
Mihai Varga
43c68037ec
Custom scrollbars for document navigation
...
jQuery scrollbars, they should be easy to replace if we find something
better, maybe something written in vanilla javascript
Github project: https://github.com/malihu/malihu-custom-scrollbar-plugin
MIT license available at:
https://github.com/malihu/malihu-custom-scrollbar-plugin/blob/master/LICENSE.txt
2015-05-04 11:20:36 +03:00
Mihai Varga
dd8a9f8145
Leaflet small fixes
2015-05-04 11:20:36 +03:00
Tor Lillqvist
1b06290d2b
Add a part parameter to the tile messages
...
The JS code always passes in 0 for now. The server parses the parameter and
calls LibreOfficeKitDocument::setPart() before calling paintTile().
Probably also the status, key, mouse and selection messages will need a part
number. The intent is after all that the protocol is as stateless as
possible. (So maybe we should also pass the document URL in each message?)
2015-04-27 21:30:26 +03:00
Mihai Varga
9cd120f7ab
Restore scrollbar offset
2015-04-27 16:03:50 +03:00
Mihai Varga
b6671341a7
The map handles keypress events but no panning keys
2015-04-27 10:18:13 +03:00
Mihai Varga
7fa1ae861d
The map should not yet handle keyboard events
2015-04-27 09:57:06 +03:00
Mihai Varga
caf7c2e6c6
The map should not trace a resize event
...
The container div should handle the resize by updating the scrollbars
This fixes the map crash during window resize.
2015-04-24 17:21:38 +03:00
Mihai Varga
497a50c76d
Tiles are added again in batch
...
This gives us smoother and faster tile loading
and a tile is requested just once
2015-04-22 20:49:20 +03:00
Mihai Varga
d0f77df767
Removed image link
2015-04-22 20:15:42 +03:00
Mihai Varga
caf1773e54
The map no longer moves when zooming == smoother zooming
...
The zoomed tiles now perfectly match the new ones that are about
to be received from the server.
The zooming factor is again exponentail (1.2) instead of linear.
TODO: when the window size modifies the gets paned out of the bounds
2015-04-22 17:49:06 +03:00
Jan Holesovsky
0214f331e7
test document: Make it clear the white area is deliberate.
2015-04-22 08:41:09 +02:00
Jan Holesovsky
ff81959c7b
Updated the loleaflet README.
2015-04-21 16:03:48 +02:00
Mihai Varga
37dfad0672
Removed pop that displays pixel location
2015-04-15 14:02:33 +03:00
Mihai Varga
3bf5939f8c
We no longer need the timeout
...
Another commit must have fixed the thing that caused the crash
2015-04-15 10:16:47 +03:00
Mihai Varga
62c394f5bd
This does not work well yet
2015-04-15 10:13:57 +03:00
Mihai Varga
57a0050421
Selection handler in leaflet
2015-04-13 20:46:09 +03:00
Mihai Varga
b666dc7d47
This better handles the scroll percentage after zooming
2015-04-13 10:39:12 +03:00
Mihai Varga
54d0af6fb8
How zoom works
2015-04-10 16:29:01 +03:00
Mihai Varga
144c9ab1df
Fixed some js lint errors
2015-04-10 16:23:23 +03:00
Mihai Varga
2aa7f55ea8
Zooming now works properly
...
The initial zoom level is 10 and it goes to:
1, which is 10% and 20, which is 200%
2015-04-10 16:15:55 +03:00
Mihai Varga
9ecc37d433
Method for adding map controls to the toolbar div
2015-04-10 14:23:46 +03:00
Mihai Varga
565ac27cb6
Readme instruction on how to use archived modules
2015-04-10 10:33:19 +03:00
Mihai Varga
225bbbc24a
Added essential node modules to avoid npm install
2015-04-10 10:29:58 +03:00
Mihai Varga
94f8076332
Map initial maxBounds are set in the constructor
2015-04-08 11:38:45 +03:00
Mihai Varga
4d8028613b
Document is placed in the middle of the screen
2015-04-08 11:01:45 +03:00
Mihai Varga
e0da2747cc
RemoveAll method for removing all selections
2015-04-07 20:21:32 +03:00
Mihai Varga
d8c221b9c2
Renamed tooltips to resemble selection and removed surface area
2015-04-07 20:20:27 +03:00
Mihai Varga
0120711974
Place toolbar items next to each other
2015-04-07 18:01:43 +03:00
Mihai Varga
a212001512
Workaround for drawing shapes bug.
...
Without this shapes cannot be shrunken when they are being drawn.
If draw a shape and then move the mouse inside it (to reduce its size)
the wrong type of event is fired and the shape is not updated.
2015-04-06 17:20:43 +03:00
Mihai Varga
e2d5e35597
README update
2015-04-06 17:14:21 +03:00
Mihai Varga
4b7362ac08
Ignore resulting js files in dist
2015-04-06 17:09:27 +03:00
Mihai Varga
a7f9b427d6
This is generated by the build
2015-04-06 17:06:50 +03:00
Mihai Varga
98e9b6ecb0
Added draw control to the example html doc
2015-04-06 17:02:43 +03:00
Mihai Varga
20195a3f43
Fixed js lint errors
2015-04-06 16:30:09 +03:00
Mihai Varga
f76216071e
Use node modules from leaflet
2015-04-06 16:20:46 +03:00
Mihai Varga
c88e7260a4
This file is generated by the build, no for it to be on git
2015-04-06 12:39:11 +03:00
Mihai Varga
ff700ae813
Added Leaflet.Draw-0.2.4
...
Draw is a plugin that adds support for drawing and editing vectors and
markers on Leaflet maps. This will be used to create selections on the
document.
Source code: https://github.com/Leaflet/Leaflet.draw
Licence: MIT
2015-04-06 12:23:19 +03:00
Mihai Varga
206a2538d6
Container's background color is the same as document's #F0F0F0
2015-04-06 10:09:16 +03:00
Mihai Varga
3fc926348d
Zooming is animated again
2015-04-06 09:55:12 +03:00
Mihai Varga
4d66d025fa
Center restore after zoom
2015-04-03 17:22:19 +03:00
Mihai Varga
f870f78e1d
Prefetch 1 tile wide border around current visible area
...
If the user scrolls slowly he won't notice the loading tiles.
2015-04-03 14:04:01 +03:00
Mihai Varga
54cf584a35
Only load tiles from the visible area (outer container)
...
Previous to this, the whole documnet was loaded because of the way
scrollbars have been added.
Now the visible area is determined by the current scrollbar position
and the outer container's size.
2015-04-03 14:00:59 +03:00
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