libreoffice-online/loleaflet
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
..
build Set LF line terminator 2015-03-09 15:58:37 +02:00
debug The map handles keypress events but no panning keys 2015-04-27 10:18:13 +03:00
dist CSS updates for the new div elements 2015-05-04 11:20:36 +03:00
node_modules Added essential node modules to avoid npm install 2015-04-10 10:29:58 +03:00
plugins/draw-0.2.4 RemoveAll method for removing all selections 2015-04-07 20:21:32 +03:00
spec Set LF line terminator 2015-03-09 15:58:37 +02:00
src New containers + restored some methods implementations to their original 2015-05-04 11:20:36 +03:00
.eslintrc Unmodified Leaflet 2015-03-09 12:16:17 +02:00
.gitignore Ignore resulting js files in dist 2015-04-06 17:09:27 +03:00
.npmignore Unmodified Leaflet 2015-03-09 12:16:17 +02:00
.travis.yml Unmodified Leaflet 2015-03-09 12:16:17 +02:00
CHANGELOG.md Unmodified Leaflet 2015-03-09 12:16:17 +02:00
FAQ.md Unmodified Leaflet 2015-03-09 12:16:17 +02:00
Jakefile.js Unmodified Leaflet 2015-03-09 12:16:17 +02:00
LICENSE Set LF line terminator 2015-03-09 15:58:37 +02:00
package.json Unmodified Leaflet 2015-03-09 12:16:17 +02:00
PLUGIN-GUIDE.md Unmodified Leaflet 2015-03-09 12:16:17 +02:00
README Updated the loleaflet README. 2015-04-21 16:03:48 +02:00

Leaflet platform for LibreOffice On-Line
========================================

This is the client part of LibreOffice On-Line.  For the server part, see the
../loolwsd/README, and install it first.

Build dependencies
------------------

First you need to install 'jake'.  As root, do:

    npm install -g jake
    npm install

Alternatively, you can use the provided zip (as a normal user):

    unzip node_modules/modules.zip -d node_modules

Building
--------

As a normal user:

    jake build
    cd plugins/draw-0.2.4
    jake build

Running
-------

To see an example:

* run loolwsd, like:

    ./loolwsd --lopath=<...>/instdir/program

* edit debug/document/document_simple_example.html, and change
  /PATH/TO/DOCUMENT to a file reachable by loolwsd

* open debug/document/document_simple_example.html in the browser, like:

    firefox debug/document/document_simple_example.html

and you should see the document in the browser.  In case anything goes wrong,
check the loolwsd console for the debugging output.

Contributing
------------

Code conventions:

    * 'jake lint' should be run before commiting
    * files should have unix line terminators (LF)
    * tools to convert files: dos2unix or fromdos

Implementation details
----------------------

Loading a document:
    The map should have the following options:
        - bounds = top left [0, 0] and something larger in the bottom right corner which
          will later be updated
        - center at [0, 0] this will try to place the [0, 0] point in the middle of the
          map, but it will be moved in the top left corner when the maxBounds are set
        - zoom = defautl zoom value, zooming in and out will refer to this value
        - server address

    The layer (actual document) should have the following options:
        - doc = path to the document that will be loaded
        - useSocket = tells the map the tiles will be received from a websocket
          connection. If this parameter is false, an image will be loaded in each tile

How zooming works:
    The zoom level goes from 1 to 20 (thoes limits can be changed) and the initial
    level is 10, which represents the 100% zoom level. 9 = 90%, 11 = 110% and so on.

Controls are added above the map in a div called "controls" is intended to be used as a toolbar.
There is no leaflet method of adding them in a separte div, so for now this is done in the html
document after the map initialization.