Commit graph

23802 commits

Author SHA1 Message Date
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
Tor Lillqvist
ceae121b16 Can remove this, too 2015-03-28 13:58:15 +02:00
Tor Lillqvist
6d9f298ee9 Prefer C++ std headers 2015-03-28 13:57:10 +02:00
Tor Lillqvist
41f41f7af5 Have lokitclient display tiles using ImageMagick's 'display' if available
Refactor the PNG encoding of a pixmap out to Util.
2015-03-28 13:57:03 +02:00
Tor Lillqvist
c5a8104c4f Add a new minimal non-GUI LOKit test program
For easier debugging of the LO code invoked through LibreOfficeKit, with is no
GUI stuff complicating debugging.
2015-03-28 13:56:03 +02:00
Tor Lillqvist
56f3678b36 Add a separate include file for some helper functions 2015-03-28 13:22:15 +02:00
Tor Lillqvist
7cb0449b8e More hacking 2015-03-27 18:25:06 +02:00
Tor Lillqvist
6e36de4534 For debugging, sleep a bit before initialising LOKit if requested
Set the SLEEPFORDEBUGGER environment variable to the number of seconds a child
process should sleep before calling lok_init(), so that you have time to
attach the process in a debugger.
2015-03-27 18:23:27 +02:00
Tor Lillqvist
cec37456ef Set no receive timeout 2015-03-27 16:53:51 +02:00
Tor Lillqvist
58f00ca165 Remove the dead "migratory socket" stuff 2015-03-27 16:26:33 +02:00
Tor Lillqvist
bb162a6ba7 Add trivial test program for sending commands to the LOOL server 2015-03-27 16:23:20 +02:00
Tor Lillqvist
022592e65c Do remove also the first level of subdirectories 2015-03-27 14:52:30 +02:00
Tor Lillqvist
70f175c9a7 Make Util a namespace instead of a class with just static member functions
This is not Java or C#.
2015-03-26 17:07:52 +02:00
Tor Lillqvist
422dfd1767 Start on load testing
Add a new program, loadtest, that runs a requested number of client sessions
in parallel to a loolwsd server. A client session loads one of a list of test
documents, and does some operations on it.

Move the getTokenInteger() and getTokenString() functions out from LOOLSession
into a new namespace LOOLProtocol, as they are neeeded also in the loadtest
program.

Add, also in LOOLProtocol, functions to parse some of the messages from the
server. (In general that is done in client JavaScript code, of course; only
for testing purposes needed in C++ code.)
2015-03-26 17:04:08 +02:00
Tor Lillqvist
425cae6b29 No need for <unistd.h> as far as I see 2015-03-26 17:04:08 +02:00
Tor Lillqvist
eb695513de Use const reference parameter 2015-03-26 17:04:08 +02:00
Tor Lillqvist
3cb43839ea Cosmetics 2015-03-26 17:04:08 +02:00
Tor Lillqvist
df95739819 Make DEFAULT_PORT_NUMBER public 2015-03-26 17:04:08 +02:00
Tor Lillqvist
b7c08d373e WaE: private field '_helpRequested' is not used 2015-03-26 14:37:38 +02:00
Michael Meeks
52376226d0 More README grist. 2015-03-25 14:16:04 +00:00
Tor Lillqvist
e8aa011af4 Undo accidental indentation 2015-03-25 15:48:28 +02:00
Tor Lillqvist
5df0766dad Return an error if the documentLoad() fails 2015-03-25 15:48:20 +02:00
Tor Lillqvist
867a66aa62 A bit more info 2015-03-24 19:04:16 +02:00
Tor Lillqvist
cae997c184 Check 'tile' parameter validity 2015-03-24 18:59:23 +02: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
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