Commit graph

2013 commits

Author SHA1 Message Date
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
8952d80dc0 No need to mention that 2015-03-24 13:16:15 +02:00
Tor Lillqvist
32de8661bc Mention how to run npm without root 2015-03-24 13:15:43 +02:00
Tor Lillqvist
97fbe8e857 Add 'saveas' 2015-03-23 22:14:11 +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
Tor Lillqvist
4974ea15b1 Bin leftover debug output 2015-03-20 15:53:00 +02:00
Tor Lillqvist
1e734c2c0e Reduce copypasta
Handle the start of a child process when needed centrally, not in each command
handler.

Also, handle unrecognized commands always already in the parent
process. (Command syntax checks still done in child process, though.)
2015-03-20 15:53:00 +02:00
Tor Lillqvist
e05092ece2 Obviously need to handle input events etc in the child process
I need to re-factor this stuff, too much copypasta.
2015-03-20 15:52:43 +02:00
Tor Lillqvist
a3897bd906 paintTile does not take a row stride parameter any more 2015-03-20 13:18:01 +02:00
Tor Lillqvist
215fda0235 Add key and mouse event handling, uno command, and selection handling
Not "handled" here of course, just pass them on to LibreOfficeKit.
2015-03-20 13:18:01 +02:00
Tor Lillqvist
721d835c79 Also mention the communication between parent and child process 2015-03-20 13:18:01 +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
Tor Lillqvist
27ea953a3b Update 2015-03-18 15:40:50 +02:00
Tor Lillqvist
e8ea0f0d2e Use separate child processes for LibreOfficeKit
For now, each LOOL client has a separate child process (or none at all, if it
has accessed only information found in the cache). This will obviously have to
chnage to handle collaboration. Etc.

The parent process talks the same Websocket protocol with the child
processes. When there is a child process for a client, traffic from the client
is forwarded as such to the child process and vice versa.
2015-03-18 15:38:01 +02:00
Tor Lillqvist
d43e148ff4 Updates 2015-03-18 01:57:37 +02:00
Tor Lillqvist
ff8ceac560 Caller expects empty string as failure, not nullptr
Fixes crash.
2015-03-16 21:08:14 +02:00
Tor Lillqvist
bd35c1aeb8 Intermediate commit, will not actually do it like this
My comment in 1b0230e4df was misleading, even if
doing this for Unix only, if we had done it as I was first thinking, we would
have needed to pass sockets between processes. But we won't, we will instead
keep all the connections to the clients in the same master process, and pass
on the WebSocketg protocol as such to child processes. That way the child
processes can go away when idle, or crash, without the connections
breaking. Or something.
2015-03-16 19:19:30 +02:00
Tor Lillqvist
50e36c7ca5 Sort 'using' statements 2015-03-16 19:19:30 +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
Tor Lillqvist
1b0230e4df Intermediate commit of start on transporting sockets to child process
Will be needed if we want loolwsd to run on Windows. Then we will have one
process receiving the connections from WebSocket clients and sending the
accepted connection sockets to child processes thatr might be already running,
either because they have been "pre-forked", or because of a collaboration
scenario where new clients join a session working on a document.

But initially we will write this as if for Unix only, so development of this
migratory socket stuff is paused for now. (And it isn't even clear whether the
API design so far is a good idea and elegantly implementable.)
2015-03-16 12:30:56 +02:00
Tor Lillqvist
ea01aa2002 Cache also document status 2015-03-13 14:17:51 +02:00
Tor Lillqvist
44c2ef32f5 Small fix to error handling 2015-03-13 13:59:51 +02:00
Tor Lillqvist
1a5e1b0fa4 Incorporate LOK_CALLBACK_* generically 2015-03-13 11:30:45 +02:00
Tor Lillqvist
68fec97752 More LibreOfficeKitCallbackType values have been added 2015-03-13 11:30:23 +02:00
Tor Lillqvist
0bfd6ee02b Use -Wall -Werror 2015-03-13 11:29:55 +02:00
Tor Lillqvist
94254ec9e4 Missing break 2015-03-13 11:25:00 +02:00
Tor Lillqvist
ad3fda27af Further hacking on tile cache 2015-03-13 01:34:42 +02:00
Tor Lillqvist
79a4eff2cf Catch and log exceptions in the TestOutput thread 2015-03-12 18:58:51 +02:00
Tor Lillqvist
076733251f No need for the DUMPPNG debugging feature any more 2015-03-12 18:58:29 +02:00
Tor Lillqvist
08583f8ebe Add first cut at caching of tiles 2015-03-12 17:26:35 +02:00
Tor Lillqvist
38d4fda3f6 Expand shell variables in LOOLWSD_CACHEDIR 2015-03-12 17:26:35 +02:00
Tor Lillqvist
02815cb03e Adapt for LOOLWSD.cpp renameing here, too... 2015-03-12 14:15:31 +02:00
Tor Lillqvist
bf611698b2 No need for a separate 'close' request
Having a 'close' would mean being able to do a new 'open', too, which
introduces unneeded complexity, at least at this stage.

Just start a fresh WebSocket connection for each document.
2015-03-09 17:45:51 +02:00
Tor Lillqvist
5c8c36b555 Simplify 2015-03-09 17:45:51 +02:00
Tor Lillqvist
163c08e62e Rename the LOOLWS class to LOOLWSD 2015-03-09 17:45:51 +02:00
Tor Lillqvist
7e363f6058 Add a few more fields for future 2015-03-09 17:45:51 +02:00
Tor Lillqvist
1fe46cdf8d Just use autoheader (or autoreconf), no need for config.h.in in git 2015-03-09 17:45:51 +02:00
Tor Lillqvist
c53f2ec458 Add LOOLWDS_CACHEDIR 2015-03-09 17:45:51 +02:00
Mihai Varga
87dc6f5b8f Set LF line terminator 2015-03-09 15:58:37 +02:00
Mihai Varga
2c7c33d454 Merge branch 'master' of ssh://git.internal.collabora.co.uk/git/icewarp 2015-03-09 15:55:01 +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