2017-02-03 07:28:48 -06:00
|
|
|
Leaflet platform for LibreOffice Online
|
2015-04-21 09:03:17 -05:00
|
|
|
========================================
|
2015-03-09 08:58:37 -05:00
|
|
|
|
2017-02-03 07:28:48 -06:00
|
|
|
This is the client part of LibreOffice Online. For the server part, see the
|
2018-04-15 14:15:52 -05:00
|
|
|
../wsd/README, and install it first.
|
2015-04-21 09:03:17 -05:00
|
|
|
|
|
|
|
Build dependencies
|
|
|
|
------------------
|
|
|
|
|
2015-08-21 10:13:26 -05:00
|
|
|
npm is provided by the nodejs package.
|
2015-04-21 09:03:17 -05:00
|
|
|
|
2016-08-05 10:25:49 -05:00
|
|
|
npm should be at least 2.14, if not 3.x. Use `npm -v` to find the current version.
|
|
|
|
Upgrade npm (as root):
|
|
|
|
|
|
|
|
npm install -g npm
|
|
|
|
|
2016-06-06 05:58:57 -05:00
|
|
|
Another way is to use npm as a user, but set its prefix to a directory where
|
2015-05-27 09:08:58 -05:00
|
|
|
you have write access. If you want that, you need to have an ~/.npmrc with the
|
|
|
|
line e.g.
|
|
|
|
|
|
|
|
prefix=/opt/npm
|
|
|
|
|
2016-08-03 03:06:14 -05:00
|
|
|
All of the dependency tree is locked in the repository, so there is no need to fetch
|
|
|
|
data from npm registry at all. An npm install will use the tarballs in node_shrinkwrap/
|
|
|
|
directory, so build process can move forward even without an internet connection.
|
|
|
|
|
|
|
|
To update any of the dependency, process often goes like this:
|
|
|
|
|
|
|
|
1.) Change version of the dependency in package.json
|
2017-08-04 07:08:47 -05:00
|
|
|
2.) Do an `npm update <package_name>', which fetches the new module from npm registry. Make sure that
|
|
|
|
only the module that you want to update is updated.
|
2016-08-09 09:57:35 -05:00
|
|
|
3.) `npm shrinkwrap --dev` to update npm-shrinkwrap.json with newer information. You might see
|
|
|
|
that this tool updates path convention of tarballs inside node_shrinkwrap/ also, but this
|
|
|
|
should get corrected in next step.
|
|
|
|
4.) Do `shrinkpack', which should remove the old tarball, add new one, and make appropriate
|
|
|
|
changes to npm-shrinkwrap.json (removing path convention changes by step 3).
|
2016-08-03 03:06:14 -05:00
|
|
|
|
2019-03-28 02:43:27 -05:00
|
|
|
If you have not installed `shrinkpack' globally using `npm install -g shrinkpack@next', it should be
|
2016-08-03 03:06:14 -05:00
|
|
|
in node_modules/.bin/shrinkpack, so you can use the binary from there.
|
|
|
|
|
2020-02-19 08:17:31 -06:00
|
|
|
If you need to get the sources:
|
|
|
|
make libs
|
|
|
|
|
2020-02-19 13:08:17 -06:00
|
|
|
To bundle the file sanitize-url.js
|
|
|
|
browserify braintree-sanitize-url/index.js --standalone sanitizeUrl > sanitize-url.js
|
|
|
|
|
2015-04-21 09:03:17 -05:00
|
|
|
Building
|
|
|
|
--------
|
|
|
|
|
2016-06-06 05:58:57 -05:00
|
|
|
Just do:
|
2015-04-21 09:03:17 -05:00
|
|
|
|
2016-06-06 05:58:57 -05:00
|
|
|
make
|
2015-03-23 12:24:39 -05:00
|
|
|
|
2016-08-16 00:47:00 -05:00
|
|
|
Above step would create a non-minified bundle.js and admin-bundle.js without source-maps in dist/ for main loleaflet and admin console
|
2016-08-09 09:57:35 -05:00
|
|
|
respectively.
|
2016-08-02 14:52:23 -05:00
|
|
|
|
2016-08-09 09:57:35 -05:00
|
|
|
To build with debug-info, i.e with sourcemaps:
|
2016-08-02 14:52:23 -05:00
|
|
|
|
2016-08-16 00:47:00 -05:00
|
|
|
make DEBUG=true
|
2016-08-09 09:57:35 -05:00
|
|
|
|
2016-08-11 06:09:54 -05:00
|
|
|
Above will produce source-map files, bundle.js.map and admin-bundle.js.map, for bundle.js and admin-bundle.js respectively.
|
|
|
|
It will also link existing bundle.js and admin-bundle.js to their map files by adding a sourceMappingURL to them. While debugging,
|
|
|
|
these .map files will be fetched from the server if present in dist/, otherwise there is no way to debug while browsing without these
|
|
|
|
source-map files.
|
2016-08-02 14:52:23 -05:00
|
|
|
|
2016-08-16 00:47:00 -05:00
|
|
|
To minify our bundle.js and admin-bundle.js passing a MINIFY=true flag to 'make' will minify it. This can be helpful in production
|
|
|
|
environments.
|
|
|
|
|
|
|
|
make MINIFY=true
|
|
|
|
|
|
|
|
'make dist' forces minifying.
|
|
|
|
|
2015-04-21 09:03:17 -05:00
|
|
|
Running
|
|
|
|
-------
|
|
|
|
|
|
|
|
To see an example:
|
|
|
|
|
|
|
|
* run loolwsd, like:
|
|
|
|
|
2019-10-01 03:35:38 -05:00
|
|
|
./loolwsd --o:sys_template_path=${SYSTEMPLATE} --o:child_root_path=${ROOTFORJAILS}
|
2015-04-21 09:03:17 -05:00
|
|
|
|
2016-03-22 05:39:22 -05:00
|
|
|
Note that this will, by default, set the loolwsd's file server's root to the parent directory of loolwsd,
|
|
|
|
which means you can access all the files in loleaflet using /loleaflet/ path. It is advised to set
|
2018-04-15 14:15:52 -05:00
|
|
|
file_server_root_path manually for more control. See wsd/README for more information.
|
2015-04-21 09:03:17 -05:00
|
|
|
|
2016-07-22 13:05:54 -05:00
|
|
|
* open dist/loleaflet.html through loolwsd's fileserver
|
2015-04-21 09:03:17 -05:00
|
|
|
|
2016-03-22 05:39:22 -05:00
|
|
|
https://localhost:9980/loleaflet/dist/loleaflet.html?file_path=file:///PATH/TO_DOC&host=wss://localhost:9980
|
2015-05-06 02:08:56 -05:00
|
|
|
|
2016-04-20 04:35:24 -05:00
|
|
|
and you should see the document in the browser.
|
2016-07-22 13:05:54 -05:00
|
|
|
Note that accessing local storage is disabled by default for security reasons. You need to explicitly enable it
|
|
|
|
with the --o:storage.filesystem[@allow]=true option of loolwsd. In case anything goes wrong, check the loolwsd console for
|
2016-04-20 04:35:24 -05:00
|
|
|
the debugging output. You might be asked to confirm the certificate if you are using self-signed certificate
|
|
|
|
for loolwsd.
|
2016-03-22 05:39:22 -05:00
|
|
|
|
2019-02-12 04:47:24 -06:00
|
|
|
Development
|
|
|
|
-----------
|
|
|
|
|
|
|
|
For faster development you might want to install browser-sync which can reload app in your browsers automatically
|
|
|
|
after you edit and save the source code (so for .css only):
|
|
|
|
|
|
|
|
npm install -g browser-sync
|
|
|
|
|
|
|
|
Remember to add '--enable-browsersync' argument for './configure' script and delete `dist` directory.
|
|
|
|
|
|
|
|
Run server and start browser-sync:
|
|
|
|
|
|
|
|
LOOL_SERVE_FROM_FS=1 make run
|
|
|
|
|
|
|
|
and in the second terminal:
|
|
|
|
|
|
|
|
make sync-[writer|calc|impress]
|
|
|
|
|
|
|
|
Your browser will open example document and now you can edit .css files and see the result without server restart.
|
|
|
|
|
|
|
|
To run another document use:
|
|
|
|
browser-sync start --config browsersync-config.js --startPath "loleaflet/96c23f663/loleaflet.html?file_path=file:///path/to/the/file.ods"
|
|
|
|
|
2016-03-22 05:39:22 -05:00
|
|
|
Admin Panel
|
|
|
|
-----------
|
|
|
|
|
|
|
|
You can do live monitoring of all the user sessions running on loolwsd instance. To access the admin
|
|
|
|
console you need to ask for admin.html file from loolwsd which resides in dist/admin/admin.html.
|
|
|
|
|
|
|
|
For example:
|
|
|
|
|
|
|
|
https://localhost:9980/loleaflet/dist/admin/admin.html
|
|
|
|
|
2016-06-27 02:41:41 -05:00
|
|
|
It will ask for username and password which is set by the admin_console options of loolwsd. For example you can
|
|
|
|
pass --o:admin_console.username=admin --o:admin_console.password=admin in command line, or set these values in
|
|
|
|
loolwsd.xml. After entering the correct password you should be able to monitor the live documents opened, total
|
|
|
|
users, memory consumption, document URLs with number of users viewing that document etc. You can also kill the
|
|
|
|
documents directly from the panel which would result in closing the socket connection to the respective document.
|
2015-04-21 09:03:17 -05:00
|
|
|
|
2015-07-15 11:25:34 -05:00
|
|
|
API & events
|
|
|
|
------------
|
|
|
|
|
2018-11-07 14:25:25 -06:00
|
|
|
#######################################################################
|
|
|
|
# See /loleaflet/reference.html for a better formatted documentation. #
|
|
|
|
# See /wsd/reference.md for the HTTP API documentation. #
|
|
|
|
#######################################################################
|
2015-10-15 10:56:19 -05:00
|
|
|
|
2015-07-15 11:25:34 -05:00
|
|
|
Search:
|
|
|
|
- API:
|
|
|
|
map.search(text, [backward])
|
2020-04-26 15:55:16 -05:00
|
|
|
map.highlightAll(text)
|
2015-07-15 11:25:34 -05:00
|
|
|
- events:
|
2015-08-12 10:06:49 -05:00
|
|
|
map.on('search', function (e) {}) (currently only fired when no search result is found) where:
|
|
|
|
+ e.originalPhrase = the phrase that has been searched for
|
|
|
|
+ e.count = number of results
|
2015-10-19 02:44:54 -05:00
|
|
|
+ e.results = [SearchResult], where SearchResult = {part: part, rectangles: [Bounds]}
|
2015-07-15 11:25:34 -05:00
|
|
|
|
|
|
|
Zoom:
|
|
|
|
- API:
|
|
|
|
map.zoomIn(amount)
|
2015-11-11 08:58:24 -06:00
|
|
|
map.zoomOut(amount)
|
2015-07-15 11:25:34 -05:00
|
|
|
map.getMinZoom()
|
|
|
|
map.getMaxZoom()
|
|
|
|
- events:
|
|
|
|
map.on('zoomend zoomlevelschange', function)
|
|
|
|
|
|
|
|
Edit, view, readOnly:
|
|
|
|
- API:
|
|
|
|
map.setPermission('edit' | 'view' | 'readonly')
|
|
|
|
- events:
|
|
|
|
map.on('updatepermission', function (e) {}) where:
|
|
|
|
+ e.perm == 'edit' | 'view' | 'readonly'
|
|
|
|
|
|
|
|
Buttons like Bold, Italic, Strike through etc.
|
|
|
|
- API:
|
2015-09-15 03:52:55 -05:00
|
|
|
map.toggleCommandState('.uno:' + 'Bold' | 'Italic' | 'Underline' | 'Strikeout' |
|
2015-09-10 04:57:11 -05:00
|
|
|
'LeftPara' | 'CenterPara' | 'RightPara' | 'JustifyPara' |
|
|
|
|
'IncrementIndent' | 'DecrementIndent'
|
2015-07-15 11:25:34 -05:00
|
|
|
- events:
|
|
|
|
map.on('commandstatechanged', function (e) {}) where:
|
2015-09-15 03:52:55 -05:00
|
|
|
+ e.commandName == '.uno:' + 'Bold' | 'Italic' | 'StyleApply' | 'CharFontName' | 'FontHeight' etc.
|
2015-07-15 11:25:34 -05:00
|
|
|
+ e.state = 'true' | 'false'
|
2015-09-14 12:14:28 -05:00
|
|
|
+ e.state = fontName | fontSize | styleName
|
2015-11-04 06:27:23 -06:00
|
|
|
map.on('commandresult', function (e) {}) where:
|
|
|
|
+ e.commandName == '.uno:' + 'Bold' | 'Italic' | 'StyleApply' | 'CharFontName' | 'FontHeight' etc.
|
|
|
|
+ e.success = true | false | undefined
|
2015-07-15 11:25:34 -05:00
|
|
|
|
|
|
|
Parts (like slides in presentation, or sheets in spreadsheets):
|
|
|
|
- API:
|
|
|
|
map.setPart('next' | 'prev' | partNumber)
|
2015-08-12 11:16:34 -05:00
|
|
|
map.getNumberOfParts()
|
2015-08-13 05:18:56 -05:00
|
|
|
map.getCurrentPartNumber()
|
2016-10-07 08:07:50 -05:00
|
|
|
map.getPreview(id, index, maxWidth, maxHeight, [options], forAllClients)
|
2015-10-15 10:46:59 -05:00
|
|
|
+ id = the ID of the request so that the response can be identified
|
|
|
|
+ index = the part / page 's number
|
|
|
|
+ maxWidth / maxHeight = max dimensions so that the ratio is preserved
|
2016-10-07 08:07:50 -05:00
|
|
|
+ options = {autoUpdate: <boolean>, broadcast: <boolean>} -
|
|
|
|
+ autoUpdate - boolean, automatically updates the previews
|
|
|
|
+ broadcast - boolean, whether the response (a preview of a slide) should be sent to all clients
|
|
|
|
viewing the same presentation
|
2015-10-15 10:46:59 -05:00
|
|
|
map.getCustomPreview(id, part, width, height, tilePosX, tilePosY, tileWidth, tileHeight, [options])
|
|
|
|
+ id = the ID of the request so that the response can be identified
|
|
|
|
+ part = the part containing the desired preview
|
|
|
|
+ width / height = the preview's size in pixels
|
|
|
|
+ tilePosX / tilePosY = the rectangles's starting position in twips
|
|
|
|
+ tileWidth / tileHeight = the rectangle's dimension in twips
|
|
|
|
+ options = {autoUpdate: true} - automatically updates the previews
|
2015-09-07 08:36:45 -05:00
|
|
|
map.removePreviewUpdate(id)
|
|
|
|
+ id = the preview's id
|
|
|
|
|
2015-07-15 11:25:34 -05:00
|
|
|
- events:
|
|
|
|
map.on('updateparts', function (e) {}) where:
|
2015-09-15 09:53:27 -05:00
|
|
|
+ e.selectedPart is the current part
|
2015-07-15 11:25:34 -05:00
|
|
|
+ e.parts == the number of parts that the document has
|
|
|
|
+ e.docType == 'text' | 'spreadsheet' | 'presentation' | 'drawing' | 'other'
|
|
|
|
+ [e.partNames] if present, part names (e.g. sheet names)
|
2015-09-07 08:28:10 -05:00
|
|
|
map.on('tilepreview', function (e) {}) where:
|
|
|
|
+ e.tile - the preview image
|
|
|
|
+ e.id - the preview id
|
2015-11-11 08:58:24 -06:00
|
|
|
+ e.width - width of the image
|
2015-09-07 08:28:10 -05:00
|
|
|
+ e.height - height of the image
|
|
|
|
+ [e.part] - if the preview is for a part
|
|
|
|
+ e.docType
|
2015-07-15 11:25:34 -05:00
|
|
|
|
|
|
|
Statusindicator (when the document is loading):
|
|
|
|
- events
|
|
|
|
map.on('statusindicator', function (e) {}) where:
|
2015-08-07 01:50:50 -05:00
|
|
|
+ e.statusType = 'start' | 'setvalue' | 'finish' | 'loleafletloaded' | 'alltilesloaded'
|
2015-07-15 11:25:34 -05:00
|
|
|
+ e.value == a value from 0 to 100 indicating the status
|
|
|
|
if the statusType is 'setvalue
|
2015-08-06 09:04:00 -05:00
|
|
|
+ 'loleafletloaded' is fired when the JS code is initialized and the document
|
|
|
|
load request is sent and we're waiting for the tiles
|
2015-08-07 01:50:50 -05:00
|
|
|
+ 'alltilesloaded' is fired when all newly requested (empty tiles) have been loaded
|
|
|
|
it is not fired during pre-fetching and during editing
|
2015-07-15 11:25:34 -05:00
|
|
|
|
2015-07-16 04:50:08 -05:00
|
|
|
Save:
|
|
|
|
- API:
|
|
|
|
map.saveAs(url, [format, options])
|
2015-10-09 08:12:07 -05:00
|
|
|
map.downloadAs(name, [format, options])
|
2015-07-16 04:50:08 -05:00
|
|
|
|
2015-07-24 08:04:28 -05:00
|
|
|
Scroll (the following are measured in pixels):
|
|
|
|
- API:
|
2015-08-12 11:43:15 -05:00
|
|
|
+ options = An object with members: update (type: Boolean, default: false)
|
|
|
|
like {update: true}
|
|
|
|
map.scroll(x,y, options)
|
2015-07-24 08:04:28 -05:00
|
|
|
+ scroll right by 'x' and down by 'y' (or left and up if negative)
|
2015-08-12 11:43:15 -05:00
|
|
|
map.scrollDown(y, options)
|
2015-07-24 08:04:28 -05:00
|
|
|
+ scroll down by 'y' (or up if negative)
|
2015-08-12 11:43:15 -05:00
|
|
|
map.scrollRight(x, options)
|
2015-11-11 08:58:24 -06:00
|
|
|
+ scroll right by 'x' (or left if negative)
|
2015-08-12 11:43:15 -05:00
|
|
|
map.scrollTop(y, options)
|
2015-08-04 03:09:10 -05:00
|
|
|
+ scroll to 'y' offset relative to the beginning of the document
|
2015-08-12 11:43:15 -05:00
|
|
|
map.scrollLeft(x, options)
|
2015-08-04 03:09:10 -05:00
|
|
|
+ scroll to 'x' offset relative to the beginning of the document
|
|
|
|
map.scrollOffset()
|
|
|
|
+ returns the scroll offset relative to the beginning of the document
|
2015-08-12 11:22:26 -05:00
|
|
|
map.getDocSize()
|
|
|
|
+ returns the document's size in pixels
|
2015-08-12 11:54:32 -05:00
|
|
|
map.getDocType()
|
|
|
|
+ returns 'text' | 'spreadsheet' | 'presentation' | 'drawing' | 'other'
|
2015-07-24 08:04:28 -05:00
|
|
|
- events
|
|
|
|
map.on('docsize', function (e) {}) where:
|
|
|
|
+ e.x = document width
|
|
|
|
+ e.y = document height
|
|
|
|
map.on('updatescrolloffset', function (e) {}) where:
|
|
|
|
+ e.x = difference between document's left and current view's left
|
|
|
|
(how much has the document been scrolled right)
|
|
|
|
+ e.y = difference between document's top and current view's top
|
|
|
|
(how much has the document been scrolled down)
|
|
|
|
- this event is fired when zooming and the current view is maintained but the
|
|
|
|
document shrinks or grow OR when the document is panned OR when the container is resized
|
|
|
|
map.on('scrollto', function (e) {}) where:
|
|
|
|
+ e.x = view's left position (so that the cursor/search result is in the center)
|
|
|
|
+ e.y = view's top position (so that the cursor/search result is in the center)
|
|
|
|
map.on('scrollby', function (e) {}) where:
|
|
|
|
+ e.x = the amount scrolled to the right (or left if negative)
|
|
|
|
+ e.y = the amount scrolled to the bottom (or top if negative)
|
|
|
|
|
2015-08-03 11:19:38 -05:00
|
|
|
Writer pages:
|
|
|
|
- API:
|
|
|
|
map.goToPage(page)
|
|
|
|
map.getNumberOfPages()
|
2015-08-13 05:18:56 -05:00
|
|
|
map.getCurrentPageNumber()
|
2015-10-15 10:46:59 -05:00
|
|
|
map.getPreview(id, index, maxWidth, maxHeight, [options])
|
|
|
|
+ id = the ID of the request so that the response can be identified
|
|
|
|
+ index = the part / page 's number
|
|
|
|
+ maxWidth / maxHeight = max dimensions so that the ratio is preserved
|
|
|
|
+ options = {autoUpdate: true} - automatically updates the previews
|
|
|
|
map.getCustomPreview(id, part, width, height, tilePosX, tilePosY, tileWidth, tileHeight, [options])
|
2015-08-13 04:58:59 -05:00
|
|
|
+ id = the ID of the request so that the response can be identified
|
2015-10-15 10:46:59 -05:00
|
|
|
+ part = the part containing the desired preview
|
|
|
|
+ width / height = the preview's size in pixels
|
|
|
|
+ tilePosX / tilePosY = the rectangles's starting position in twips
|
|
|
|
+ tileWidth / tileHeight = the rectangle's dimension in twips
|
2015-09-02 09:12:02 -05:00
|
|
|
+ options = {autoUpdate: true} - automatically updates the previews
|
2015-09-07 08:36:45 -05:00
|
|
|
map.removePreviewUpdate(id)
|
|
|
|
+ id = the preview's id
|
2015-10-15 11:17:18 -05:00
|
|
|
map.getPageSizes()
|
|
|
|
+ returns {twips: [Bounds], pixels: [Bounds]}
|
2015-08-13 04:58:59 -05:00
|
|
|
|
2015-08-03 11:19:38 -05:00
|
|
|
- events
|
|
|
|
map.on('pagenumberchanged', function (e) {}) where:
|
|
|
|
+ e.currentPage = the page on which the cursor lies
|
|
|
|
+ e.pages = number of pages
|
|
|
|
+ e.docType = document type, should be 'text'
|
2015-08-06 09:41:56 -05:00
|
|
|
|
|
|
|
Error:
|
|
|
|
- events
|
|
|
|
map.on('error', function (e) {}) where
|
2015-08-11 03:37:26 -05:00
|
|
|
+ [e.msg] = a message describing the error
|
|
|
|
+ [e.cmd] = the command that caused the error
|
|
|
|
+ [e.kind] = the kind of error
|
2015-08-06 09:41:56 -05:00
|
|
|
|
2018-02-22 07:19:03 -06:00
|
|
|
Infobars:
|
|
|
|
- events
|
|
|
|
map.on('infobar', function (e) {}) where
|
|
|
|
+ [e.msg] = a message
|
|
|
|
+ [e.actionlabel] = Label for the action button
|
|
|
|
+ [e.action] = A link (starting with http).
|
|
|
|
Please extend to allow other actions when needed.
|
|
|
|
|
2015-09-09 12:35:36 -05:00
|
|
|
CommandValues:
|
|
|
|
- api:
|
|
|
|
map.getToolbarCommandValues(command)
|
|
|
|
+ returns a JSON mapping of all possible values for the command
|
2015-09-10 03:26:47 -05:00
|
|
|
map.applyFont(fontName)
|
|
|
|
map.applyFontSize(fontSize)
|
2015-09-10 03:29:19 -05:00
|
|
|
map.applyStyle(style, styleFamily)
|
2015-09-09 12:35:36 -05:00
|
|
|
- events
|
|
|
|
map.on('updatetoolbarcommandvalues', function (e) {}) where
|
2015-11-11 08:58:24 -06:00
|
|
|
+ e.commandName = '.uno:StyleApply', etc
|
2015-09-09 12:35:36 -05:00
|
|
|
+ e.commandValues = a JSON mapping of all possible values for the command
|
|
|
|
|
2015-10-19 03:31:20 -05:00
|
|
|
Print:
|
|
|
|
- events
|
|
|
|
map.on('print', function (e) {}) where
|
|
|
|
+ e.url = file download url
|
2015-08-18 06:34:10 -05:00
|
|
|
|
2015-04-21 09:03:17 -05:00
|
|
|
Contributing
|
|
|
|
------------
|
|
|
|
|
|
|
|
Code conventions:
|
|
|
|
|
|
|
|
* files should have unix line terminators (LF)
|
|
|
|
* tools to convert files: dos2unix or fromdos
|
|
|
|
|
|
|
|
Implementation details
|
|
|
|
----------------------
|
2015-03-24 06:15:43 -05:00
|
|
|
|
2015-03-23 12:24:39 -05:00
|
|
|
Loading a document:
|
|
|
|
The map should have the following options:
|
|
|
|
- server address
|
2015-09-01 10:15:43 -05:00
|
|
|
- doc - path to the document that will be loaded
|
|
|
|
- edit = the initial permission
|
|
|
|
- readOnly - whether the document is read only
|
|
|
|
- [timestamp] - optionally provided for remote documents
|
2015-03-23 12:24:39 -05:00
|
|
|
|
2015-04-10 08:29:01 -05:00
|
|
|
How zooming works:
|
2015-05-01 11:18:03 -05:00
|
|
|
The zoom level goes from 1 to 20 (those limits can be changed) and the initial
|
|
|
|
level is 10, which represents the 100% zoom level. The zoom factor is 1.2
|
2015-04-10 08:29:01 -05:00
|
|
|
|
2015-04-06 09:14:21 -05:00
|
|
|
Controls are added above the map in a div called "controls" is intended to be used as a toolbar.
|
2015-05-01 11:18:03 -05:00
|
|
|
There is no leaflet method of adding them in a separate div, so for now this is done in the html
|
2015-04-06 09:14:21 -05:00
|
|
|
document after the map initialization.
|
2015-05-01 11:18:03 -05:00
|
|
|
|
2015-05-06 02:08:56 -05:00
|
|
|
To enable scrollbars the map is placed above a div that contains a bigger div of
|
|
|
|
the document's size (a mock document). So the div under the map gets scrollbars which
|
2015-05-01 11:18:03 -05:00
|
|
|
are independent of the map's div, thus enabling us to link them to the map as needed.
|
|
|
|
When the user scrolls, the map is panned by the same amount as it would've been scrolled.
|
2015-05-06 02:08:56 -05:00
|
|
|
Also, some custom jquery scrollbars are used, to trigger the same scroll events across
|
2015-05-01 11:18:03 -05:00
|
|
|
browsers.
|
2019-02-07 08:17:21 -06:00
|
|
|
|
|
|
|
Z-index values:
|
|
|
|
-------------------------------------------
|
|
|
|
leaflet
|
|
|
|
-------------------------------------------
|
|
|
|
10 map
|
|
|
|
11 ruler
|
|
|
|
-------------------------------------------
|
|
|
|
under menu
|
|
|
|
-------------------------------------------
|
|
|
|
990 sidebar
|
|
|
|
999 toolbar-up
|
|
|
|
-------------------------------------------
|
|
|
|
menu items
|
|
|
|
-------------------------------------------
|
2019-10-18 03:21:06 -05:00
|
|
|
1000 main-menu(desktop-only), toolbar-down
|
|
|
|
1050 closebuttonwrapper (not being used currently)
|
2019-02-07 08:17:21 -06:00
|
|
|
-------------------------------------------
|
|
|
|
on the top
|
|
|
|
-------------------------------------------
|
|
|
|
1105 dialogs
|
2019-10-18 03:21:06 -05:00
|
|
|
1001 mobile-edit-button
|
|
|
|
1500 mobile-wizard (with class=menuwizard)
|
|
|
|
1501 toolbar-hamburger (with class=menuwizard-opened)
|
|
|
|
2000 vex-overlay
|
|
|
|
2001 vex dialog (vex-content)
|
2019-02-07 08:17:21 -06:00
|
|
|
-------------------------------------------
|