Commit graph

2716 commits

Author SHA1 Message Date
Andrea Bogazzi
bd0d0125be improved jsdoc 2018-06-01 23:46:54 +02:00
Andrea Bogazzi
6db1b1d211
Use the new mousedown:before to understand if an object is already selected on mousedown (#5010)
* fix something

* other changes
2018-05-30 11:29:27 +02:00
Nick Zaitsev
b77957f3ec fixed IText's cursor and text selection not ignoring charSpacing at the end of line (#5008) (#5009) 2018-05-30 08:53:17 +02:00
Nick Zaitsev
b1c25a4f56 fixed text underline/overline/linethrough not ignoring charSpacing at the end of line (#5006) (#5007) 2018-05-30 08:52:16 +02:00
Andrea Bogazzi
bafc28d3fc
Svg import improvements (#4984)
* test

* svg-import-fixes

* svg-import-fixes

* ok done

* adapted tests to new values
2018-05-29 10:28:02 +02:00
Andrea Bogazzi
68d2ed7d3c modified jsdoc 2018-05-21 09:32:22 +02:00
Andrea Bogazzi
13e452bc20 added some jsdoc 2018-05-19 23:58:26 +02:00
Andrew Johnson
c3b6e65f82 isTargetTransparent() now samples the cache directly. (#4955)
* isTargetTransparent() now samples the cache directly.

Previously, isTargetTransparent would do a paint from the cache
to the contextCache which has more overhead and is slower.
With this commit, fabricjs will test the cache canvas directly
using x/y coordinates calculated with respect to the target object
center. This is more performant since it avoids an extra render
on every call to isTargetTransparent.

* remove cacheDirty that should not be needed.
2018-05-19 23:52:34 +02:00
Andrea Bogazzi
ac804af486
Add new events for transformations (#4979)
* before:transform event

* added more properties to transform events

* add some more events

* fix lint

* tests
2018-05-19 23:37:09 +02:00
Andrea Bogazzi
0828face97
Brush problems (#4938) 2018-05-08 10:59:42 +02:00
keyurpatel
885545aca8 isEqual fails hard. (#4949)
* fix current value null issue
2018-05-07 20:12:53 +02:00
Andrea Bogazzi
a267b76e8d more-gl-options 2018-04-29 12:09:11 +02:00
keyurpatel
fcef0a3bcf isPartiallyOnScreen method (#4856)
* appears

* new methods

isPartiallyOnScreen
isOffScreen

* UT

* test

* comment improved

* removed isOffScreen

* removed isOffScreen

* Update object_geometry.mixin.js

* Update object_geometry.mixin.js

* lint...

* omg
2018-04-28 14:35:24 +02:00
Andrea Bogazzi
b1b5f89bc5
Writing shader to avoid premultiplied alpha pixel getting dirty (#4936)
* first one
* changed filters
* fixed errors
2018-04-28 13:52:35 +02:00
Andrea Bogazzi
4c2e59a3cd
modified shadow tosvg (#4934) 2018-04-28 01:17:45 +02:00
Andrea Bogazzi
b946e8ae6b Merge branch 'master' of github.com:kangax/fabric.js 2018-04-28 00:50:18 +02:00
Andrea Bogazzi
09a8c751db some jsdocs 2018-04-28 00:50:07 +02:00
Andrea Bogazzi
d84969f68c
Register mousemove as non passive to help touch devices (#4933)
* fix-event-reg

* this was the file

* take care of touch-action too
2018-04-28 00:36:17 +02:00
Andrea Bogazzi
debf1ec069 fixed typo in filter 2018-04-24 11:20:40 +02:00
antucg
18abedd960 Fix blur for node.js (#4905) 2018-04-13 10:52:25 +02:00
Arlen Yu
d73dbabb15 Fixing issues with selectionDashArray bleeding into free drawing (#4894) (#4897)
* Fixing issues with selectionDashArray bleeding into free drawing

* Resetting line dash in _setBrushStyles when there is no strokeDashArray
2018-04-11 11:45:23 +02:00
Nicolas Morel
fe55cf4d4a Fix getPointer on touch devices (#4866)
* Fix getPointer on touch devices

If the pointer is at x=0 or y=0, it returns NaN.

* Update dom_event.js
2018-04-08 21:29:26 +02:00
Andrea Bogazzi
77862ef41c
fix the parsing of the URL part of a property. (#4881)
* fix gradient parse url

* added test

* fix lint
2018-04-01 20:39:49 +02:00
Andrea Bogazzi
24a97a3327 fixed doc for excludeFromExport 2018-04-01 18:49:37 +02:00
Alexey Smirnov
addea82c53 Add letter spacing support for svg (#3718)
* add letter spacing support for svg

* fix letter spacing for Parser

* Update itext.svg_export.js

* Update text.class.js
2018-04-01 18:44:18 +02:00
Andrea Bogazzi
c7895d1956
add whitespace support for multiple spaces (#4880) 2018-04-01 18:28:11 +02:00
Andrea Bogazzi
1e5c64ff2a
Reset width and height for an image when swapping src (#4877)
* ok

* added simple test

* working test
2018-04-01 14:52:37 +02:00
Andrea Bogazzi
ea4b53cf6f
Removed the code for swapping origin for rotation (#4878)
* lots of code deleted

* rotation working

* a change

* added simple test

* resolve conflict
2018-04-01 14:28:07 +02:00
Andrea Bogazzi
d5f3bf4a79
Canvas SVG export (#4852)
* changed export

* mmm

* mmm

* added some tests

* fixed tests

* ....lint

* ....lint
2018-04-01 00:11:53 +02:00
Andrea Bogazzi
e04c19b8e3 updated jsfiddle demo for setBackgroundImage 2018-04-01 00:07:33 +02:00
Andrea Bogazzi
41a9b77cbb
added startAngle to cacheProperties (#4875) 2018-03-31 13:50:51 +02:00
Andrea Bogazzi
375d99380c
done something (#4850) 2018-03-24 23:05:15 +01:00
Andrea Bogazzi
682eac4545
removed references to context when disposing (#4846)
* removed references to context
* improved test
* try fix error
2018-03-22 12:35:12 +01:00
dennisrjohn
17386fc240 Added single quoting to font names in toSVG (#4840)
* Added font quoting to toSVG
* fixed test
2018-03-22 12:02:06 +01:00
Andrea Bogazzi
936df6b6f4
add reserved space to wrapLine functionality (#4841)
* added back reserved space

* added test
2018-03-19 20:05:54 -04:00
Andrea Bogazzi
eb97ed56f2
ApplyFilters updates dirty flag in orde to refresh groups (#4828)
* added dirty to apply filter

* applied to resize filter too

* applied to resize filter too

* fixed test

* fixed tests
2018-03-17 01:12:19 -04:00
dennisrjohn
7698801feb New PR fo 4808 (#4831)
* new commit per asturur

* new commit per asturur
2018-03-17 00:15:54 -04:00
Andrea Bogazzi
2ce99ee0b7
fixed calculate position (#4827)
* fixed calculate position

* Re-enabled tests.
2018-03-15 23:45:56 -04:00
Nate Evans
5155da9fce Use clientWidth and clientHeight of upperCanvas to size hiddenTextarea (#4768)
* Use clientWidth and clientHeight of upperCanvas to size hiddenTextarea to work with dynamic sized canvas.
2018-03-15 22:46:01 -04:00
Andrea Bogazzi
d105638e65
fixed multiple touchend (#4804) 2018-03-12 02:07:47 -04:00
Andrea Bogazzi
808faa6d5f
fix textbox wrapping with charspacing (#4803)
* fix textbox and charspacing

* added test

* enabled all tests
2018-03-12 01:53:43 -04:00
Andrea Bogazzi
c7f6154bb5
fixed empty line (#4802) 2018-03-11 13:14:43 -04:00
Andrea Bogazzi
e27296ca35
Moving AMD require on top, after NOT including common JS (#4797)
* fixed amd
2018-03-11 09:31:23 -04:00
Andrea Bogazzi
abbeb91763
Changed params for setSuperScript, setSubScript (#4780)
* changed params
* fixed toSVG export
2018-03-06 12:36:52 +01:00
scriptspry
38f2d5cd99 Fixed incorrect Object.isOnScreen functionality. (#4763)
* Added missing calculate parameter in Object.isOnScreen.

* Update object_geometry.js
2018-03-01 01:44:43 +01:00
Andrea Bogazzi
8235c1aea5
fix (#4774) 2018-03-01 01:37:36 +01:00
Andrea Bogazzi
d0a4ecba21
try remove the ie11 fix (#4772) 2018-03-01 01:21:34 +01:00
Andrea Bogazzi
aa9b8a6b33
Add BaselineShift property to fabricJS (#4765)
* 'deltaY', superscript, subscript etc. (#4177)
2018-03-01 01:07:15 +01:00
Andrea Bogazzi
bc61425c1f
Version 210 (#4764)
* Version 2.1.0

* built

* remove window.fabric

* rebuilt
2018-02-26 11:25:53 +01:00
Andrea Bogazzi
1c10b8c1e3
events drag (#4421)
added drag and drop events
2018-02-24 22:19:58 +01:00
Andrea Bogazzi
e70e65fe92
isEmptyStyles for textbox (#4762)
* isEMptyStyles for textbox
* added tests
* added missing file
2018-02-24 18:45:23 +01:00
Stefan Hayden
71b28012fc cleanup function to be more readable (#4756)
* cleanup function to be more readable

* update style variable to be more descriptive and use the styleObject reference in one more place
2018-02-21 18:03:11 +01:00
Andrea Bogazzi
3a92eb92ae
test (#4753) 2018-02-21 12:02:49 +01:00
yao
f855bbcbf3 add drawDot func to pencilbrush (#4743) 2018-02-21 11:20:43 +01:00
Stefan Hayden
d1e5337c2d ensure canBeSwapped can only be true when a style prop has actually been set to a value (#4751) 2018-02-20 21:53:54 +01:00
scriptspry
d569407d3a Fixes StaticCanvas.onBeforeScaleRotate not triggering when canvas is zoomed (#4748)
* Fixed StaticCanvas.onBeforeScaleRotate not getting triggered when canvas is zoomed.

* Added test for Canvas._beforeTransform.
2018-02-20 20:41:42 +01:00
Andrea Bogazzi
b47815e411
added image crop ToSVG support (#4738)
* added svg crop support
2018-02-18 23:50:08 +01:00
Andrea Bogazzi
2e532cc362
Limit sin and cosin very small floats on 90/270 degrees (#4734)
* so far ok

* fix transformations decimal

* remove some changes

* less changes

* test passing

* less calculation

* added shortcut

* modified tests
2018-02-18 15:56:27 +01:00
Dennis Keck
687cd7b495 Update brightness_filter documentation (#4727)
The value range for brightness changed to floating point range [-1.0,1.0]
2018-02-18 09:45:46 +01:00
Andrea Bogazzi
75ba9e1ac8
fixed filter (#4706) 2018-02-10 13:14:26 +01:00
Andrea Bogazzi
361db0b8a2
added test for dataUrl (#4705) 2018-02-10 13:12:00 +01:00
Andrea Bogazzi
d8dab88a46
Fix originX and originY missing in the matrix cacheKey (#4703)
* added test
* fixed the typo
2018-02-10 12:16:09 +01:00
JC
a14b9722ba #4693: multiplier in toDataURL is not working (#4698) 2018-02-10 11:43:40 +01:00
Stefan Hayden
e13bc33c63 do not mutate passed object to fromObject (#4699)
* do not mutate passed object to fromObject

* add a test

* this is what you get for editing in github.com
2018-02-10 00:46:28 +01:00
Andrea Bogazzi
dea22aca70
Fixes (#4674)
* default no retina for dataurl
* make num_fraction_digits variable
* restored aborted changes
* mispelled param
* added test for SVG
* added test for toDataUrl
* how it could even run
* simpler test
* i hope they will pass now
* fed up
* completely cheating
* fallback on dumb test
* test also this
* test also this
* more tests
2018-02-04 22:42:32 +01:00
Andrea Bogazzi
6d0ad48224
safeguard canvas (#4650) 2018-01-28 12:51:51 +01:00
Andrea Bogazzi
2f19c8c7e8
fix calcOffset when text enter editing (#4649) 2018-01-26 22:49:39 +01:00
Andrea Bogazzi
4f446020ba
added a simple test (#4647) 2018-01-26 11:12:27 +01:00
Andrea Bogazzi
43ebcd8278
Gradient fix parsing floats (#4637)
* fixed gradient parsing and circle width/height leak

* added a small test

* fix lint

* test re enabled

* fixed tests
2018-01-20 01:09:47 +01:00
Andrea Bogazzi
6309387665
Add CrossOrigin managment to fabric.Pattern (#4618)
* added crossOrigin

* adding tests

* added some basic test
2018-01-18 08:39:02 +09:00
DangerD256
8792d83679 Add patternTransform toObject saving (#4626)
* Add patternTransform toObject saving
* Update pattern.class.js
2018-01-17 20:46:59 +09:00
Andrea Bogazzi
0a7aba74ee
GIving brushes a _render method (#4613)
* solves error

* rerender just if there is an activeObject
2018-01-12 07:30:53 +09:00
Andrea Bogazzi
df48f43f14
avoid charspacing shortcut (#4594) 2017-12-30 11:57:38 +01:00
Justin Parker
4846789bf0 Fix color toHexa() (#4579)
* Failing Color.toHexa() test

* fix color toHexa() to not give decimals

* fix hexa test due to rounding
2017-12-27 10:05:40 +01:00
Andrea Bogazzi
69439efe92
minor changes to event (#4561) 2017-12-14 21:42:13 +01:00
Andrea Bogazzi
38fcf8e274
Fix the wrapper (#4554) 2017-12-13 00:08:57 +01:00
Asturur
2a7e6919f8 corrected some jsdocs 2017-12-11 10:52:44 +01:00
Andrea Bogazzi
fb13ed0bdf
Insert a method to insert text programmatically (#4551)
* sofar

* test
2017-12-10 21:13:38 +01:00
laof
168ce21794 Deleting a disagreeable line; (#4549)
Extra closepath on control drawing
2017-12-10 09:15:01 +01:00
Andrea Bogazzi
036e1a71ee
Remove extra code from Circle/Triangle (#4547)
* removed code

* removed code

* removed code
2017-12-09 11:32:26 +01:00
Andrea Bogazzi
891a8e096e
handle top canvas in resize/renderAll (#4527)
* handle top canvas in resize/renderAll

* fix brush
2017-12-03 17:15:46 +01:00
Andrea Bogazzi
587d0657d6
fixed wrapped lines (#4526) 2017-12-02 21:18:41 +01:00
Asturur
d276707e2d add strokewdith to cachekey 2017-12-02 11:29:15 +01:00
Andrea Bogazzi
c96bb92705
Reinsert text shortcut for some cases (#4519)
* test

* use simple text line not grapheme
2017-12-02 11:24:03 +01:00
Andrea Bogazzi
88a2c7c64a
remove extra tab and newlines (#4524) 2017-12-02 11:11:11 +01:00
Andrea Bogazzi
1d57f499c6
sovled small things (#4518) 2017-11-30 11:34:18 +01:00
Jérôme Steunou
7b64898d72 Add an option to selection objects only when 100% intersect (#4508)
* Add an option to selection objects only when 100% intersect

* Better description

* Cache property negation

* Add unit tests

* Remove boundary tests, not specific to this option
2017-11-29 12:40:17 +01:00
Andrea Bogazzi
0496c0d120
update to rc3 (#4499) 2017-11-25 16:43:39 +01:00
Andrea Bogazzi
71b36f6228
Node canvas (#4497)
* readded

* paused

* test

* try jsdom

* restore node methods

* restored

* restored

* fix tests
2017-11-24 19:00:47 +01:00
Andrea Bogazzi
a9eacc4d74
Remove chars from to (#4495)
* trying to fix

* make removeChars

* fixed doc

* added test
2017-11-24 17:26:38 +01:00
Asturur
0730e9cda2 fix typo on hovercursor 2017-11-24 12:00:01 +01:00
Andrea Bogazzi
fd14303dae
Fix drawing of a point (#4492)
* initialize at 1

* added tests

* added test file
2017-11-24 11:36:36 +01:00
Andrea Bogazzi
a9d2fb1ba5
Fix scaling issues that involves width/height (#4491)
* fixed
* added a small test
* typo
2017-11-23 18:04:54 +01:00
Jérôme Steunou
91de6d078d Remove push on shared array (#4478)
follow up for #4465
2017-11-20 13:16:18 +01:00
Andrea Bogazzi
031531b218
Reduce leaks in NODEJS continue canvas creations (#4471)
* reduce leaks in node

* fix test
2017-11-19 23:41:42 +01:00
Andrea Bogazzi
7eea5228b9
removed specific node code (#4470)
* removed node code

* fixed UTs
2017-11-19 20:00:01 +01:00
Andrea Bogazzi
841e77ebb9
re enable resize filter (#4469) 2017-11-19 16:30:06 +01:00
Andrea Bogazzi
57c5d5150c
removed extra padding (#4467) 2017-11-18 16:59:10 +01:00
Andrea Bogazzi
0df3f55dc3
removed this.ctx (#4466) 2017-11-17 23:54:15 +01:00
Andrea Bogazzi
c975247db8
removed array reference for _dimensionsAffectingProps (#4465)
* removed array reference

* better to concat

* better visibility
2017-11-17 19:45:48 +01:00