Commit graph

4 commits

Author SHA1 Message Date
bhavik001
38e81921e2
Formatting and Add formatting to CI workflow (#292)
* Add prettier formatting feature and also add it as a job in CI.yml file

* Update CI.yml file

* Add format job to CI.yml file

* Fix formatting issues in CI workflow file
2023-11-25 01:37:05 +01:00
finnboeger
740246528f
Add a whiteout tool as the secondary function of the pencil tool (#47)
* added whiteout icon made by Freeplk on flaticon.com

* added whiteout fluid icon (public domain).

* Added whiteout tool as secondary function of pencil tool.

Co-authored-by: Robert Beach <rdbeach@gmail.com>

* shrink icon width using stroke

* shrink whiteout icon properly

* shrink whiteout fluid icon

* reduce number of allowed messages

* simplify

* remove layer code

* renmove show/hide marker code

* change white to #ffffff

* make toggle function compatible with current implementation

* Revert changes unrelated to the whiteout tool

* Refactor secondary tool logic between ellipse and pencil

* Add translations for the whiteout pen

* Fix tests

Co-authored-by: Robert Beach <rdbeach@gmail.com>
Co-authored-by: ophir <pere.jobs@gmail.com>

(@rdbeach)
2020-05-13 22:15:11 +02:00
finnboeger
57a02c42d6
Improve compatibility with Internet Explorer (#63)
* 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
2020-05-05 12:01:46 +02:00
finnboeger
3c453e15c2
Add an ellipse and circle tool (#40)
* 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>
2020-05-03 17:53:44 +02:00