* include promise polyfill
* remove es6
* add viewBox to every icon
* change self closing to explicitly closing tags
* replace window.scroll.. with document.documentElement.scroll..
* verify document.activeElement.blur() is a function before calling
* fix visuals of color chooser (colorpicker still sometimes buggy)
* do not attach to mouseleave event in IE
* attempt removal with usecapture true in IE as well, this fixes the tool switching issue
* fix text tool for IE
* fix cursor for IE
* change curMode to boolean and rename to 'active'
* replace minified canvascolor with unminified code
* replace if else structure with switch statement
* compile polyfill for each browser individually
* remove static polyfills from board.js
* Fix broken js reference
* Fix unused variable and empty console log
* Allow serving non-minified polyfills for easier debugging
* Add proper caching for polyfill.js
This request is on the critical path, we should try to make it fast
* Include more polyfills
All the DOM polyfills were missing
* Update dependencies
* Add missing polyfill
Our custom polyfill was deleted, but the one from polyfill-library hadn't been added
* Remove feature detection for Node.contains
We now have the function in the polyfills
* Update polyfill caching logic
* Remove content-Length header
Co-authored-by: @lovasoa
* Add oneTouch option when creating tool. These tools won't be selected, rather their onstart action will be executed once.
Useful for undo/redo/clear/upload/zoom-in/zoom-out
* added grid
* move pattern to dedicated file
* Reformat code in grid tool
* Restore the gradient over the active tool
* Remove some duplicated code in oneTouch handling
Co-authored-by: Robert Beach <rdbeach@gmail.com>
Co-authored-by: Ophir LOJKINE <pere.jobs@gmail.com>
* Added Circle tool as alternative function of Rectangle tool
* change toggle function to work with new icon structure and toggle name
* split circle into separate tool and added ellipse as secondary function. Also added server side rendering for svg export
* change ellipse to be default
* change circle behaviour to same as inkscape
* toggle to alternative while holding shift
* append to drawing area instead of svg root
* don't update shape after it has been drawn
* Stop logging all rectangles
* Remove es6
* Remove more es6
* Fix a few bugs with circle to ellipse toggling
* Calculate the circle params at creation time, not at rendering time
* Make the behavior of the shift key consistent
When shift is pressed, the current function is reversed: the circle tool draws an ellipse and the ellipse tool draws a circle.
This makes the tool easier to grasp.
* Add required translations
* german translation
* Update the shape immediately when pressing shift
* Fix server-side ellipse rendering
* Add a test for the circle tool
Co-authored-by: Robert Beach <rdbeach@gmail.com>
Co-authored-by: Ophir LOJKINE <pere.jobs@gmail.com>
* add option to change pen size with the scroll wheel
* Update the cursor size immediately when changing the size
* Add a tooltip with the size change shortcut
Co-authored-by: ophir <pere.jobs@gmail.com>
* Added cursors
* Prepare cursor code for future settings to toggle cursors on or off.
Let cursor be the color the person has currently selected
* fix cursor on mobile (still won't display it in most cases as there is no hover on mobile but at least it won't throw errors)
* use correct size for cursor
* throttle cursor update rate to dramatically improve performance by eliminating congestion
* fix remote cursor size on desktop
* show own cursor by default and renove offset
* use svg as mouse cursor for pencil to be able to apply a reduced opacity to it and view our cursor
* don't throttle local cursor
* throttle local cursor at an independent higher rate. This could be made user adjustable for low power devices
* remove let and const from client-side code
* get emit count and emit count period from configuration
* reduce network cursor updates a lot to prevent instantly getting banned with the current defaults
* prevent eraser from deleting cursors
* use group inside of svg as drawing area and only delete elements inside it with the eraser
* use transform: translate to move cursors around instead of manipulating x and y directly
* fix: add socket ids to cursor messages
* fix incorrect remote cursor scaling and make local cursor visible again after it has been moved after being hidden due to inactivity
* create cursors in a proper fashion and keep them in a separate group
* scaling has been fixed in a1a5580
* move duplicated cursor creation code to function
* show cursors above content
* pass some of ther server configuration through to the client
* fix bug introduced in a833ce9
* allocate at most half of the allowed traffic to cursor updates
* remove debugging leftover
* use feature detection instead of ua sniffing
Co-Authored-By: Ophir LOJKINE <ophir.lojkine@auto-grid.com>
* fix regression where local cursor color was not updated on color change
* Define the cursor as a tool
* Remove the cursor tool from the UI
* Throttle remote cursor updates, not local ones
* Do not increment notification count on cursor move
* Use only one pencil icon
Use the same image for the pencil icon in the menu
and the pencil cursor that appears while drawing
* Add a test for the new cursor feature
* only stop drawing remote cursor when using some tools and always draw local cursor
* increase idle period before hiding cursor
* change idle duration back and set whether a cursor should be sent when using a tool in the respective tool
Co-authored-by: Robert Beach <rdbeach@gmail.com>
Co-authored-by: Ophir LOJKINE <ophir.lojkine@auto-grid.com>
Co-authored-by: ophir <pere.jobs@gmail.com>
* change url to hide app behind a relative path
* pass some of ther server configuration through to the client
* serve static files and connect to socket.io correctly when a URL Prefix is set
* Revert the changes to opengraph meta tags
opengraph meta tags need to be absolute URLs
* Remove unused commented-out code
* fix background.png url
* use prefix path for open graph metadata
* Revert changes using server side url modifications
* get open graph and socket.io url from request url / window.location
* remove debug console.log
* Fix favicon when not running under "/"
* Add proxying instructions to the README
Co-authored-by: Laurent Mazet <mazet@softndesign.org>
Co-authored-by: ophir <pere.jobs@gmail.com>
* fix color picker on safari
* do not block space above and below opened tooltip from passing pointer events through to the svg
* don't automatically retract tooltip when hovering
* use focus instead of hover on mobile and blur focus on first touchmove
* stop UA sniffing and assert that activeElement exists before attempting to blur
* Disable dragging of menu icons
* Remove unused CSS property
Property is ignored due to the display. With 'display: block', vertical-align should not be used.
* Better image dragging prevention
Co-authored-by: Ophir LOJKINE <ophir.lojkine@auto-grid.com>
Make the text field of the text tool appear at the position where the text will be written.
* improved Text tool
* ignore layers for now
* only assert value is not null or undefined / allow 0 as value
* remove unused layer code
* Reformat text.js
Co-authored-by: Robert Beach <rdbeach@gmail.com>
Co-authored-by: @finnboeger
* Initial Changes (#1)
* Move socket event handlers and initial connection to connect function
* Converted await statements to .then()
* Toggle tool if clicked again and toggling option exists
Co-authored-by: Finn Böger <finnboeger@googlemail.com>
Co-authored-by: Robert Beach <rdbeach@gmail.com>
* Updated client styles
- disable selecting text in tool menu
- change design of tool boxes to be square and smaller
- reduce text size in sliders
Co-authored-by: Finn Böger <finnboeger@googlemail.com>
* Changed Apple Touch Icon
* Update size and opacity icon, include fontawesome for future use
Co-authored-by: Finn Böger <finnboeger@googlemail.com>
* Changed favicon svg
* replace font-family with valid value
* Added icons and icomoon font
* change eraser and zoom icon
Co-authored-by: Finn Böger <finnboeger@googlemail.com>
* Revert icon change for now
* Revert "Converted await statements to .then()"
This reverts commit b35e0207df.
* Revert "Revert icon change for now"
This reverts commit 34e354f00f.
* Restored new Icons
* Restored favicon
* Remove fontawesome
* Increase icon sizes
* Update the zoom icon
See https://github.com/lovasoa/whitebophir/pull/39#issuecomment-619524098
* set display inline block for tool names, otherwise firefox doesn't respect margin-bottom
* Rework tool icons
* fix color presets position
Co-authored-by: finnboeger <finnboeger@users.noreply.github.com>
Co-authored-by: Robert Beach <rdbeach@gmail.com>
Co-authored-by: Finn Böger <finnboeger@googlemail.com>
Color presets (#25)
* Add color presets with keys 0..9
Also, initialize size/thickness with 7.
* Add click-able buttons for color presets
* Refactor color presets: use Minitpl
Use Minitpl for creating the color preset buttons. Also, allow for more
colors than keys and don't use just numeric keys, but allow all
characters.
* Fix layout for case if no color presets are defined
* colors in array, CSS fix, restore random initColor
See: https://github.com/lovasoa/whitebophir/pull/24#issuecomment-608409282
* Remove hardcoded size
* Simplify condition
Co-authored-by: adrian.buerli <adrian.buerli@ims.co.at>