Commit graph

2716 commits

Author SHA1 Message Date
Andrea Bogazzi
10a8684192
Proposal for different lineJustify. (#4437)
* not even tested

* Small fixes (#4441)

* fixed selection

* fixed svg export
2017-11-12 23:00:59 +01:00
Andrea Bogazzi
51a9e87854
fixed group restoring internal absolute coords for subtarget check (#4454)
* fixed group restoring internal cords

* added small test
2017-11-12 15:54:33 +01:00
Andrea Bogazzi
d65b5dd5a1
removed with dims (#4453) 2017-11-12 15:18:28 +01:00
Andrea Bogazzi
61c415be26
Partially solve cache fuzzyness (#4452)
* made less funzzy

* solved lint

* cleaned a bit

* fixed tests
2017-11-12 14:59:36 +01:00
Andrea Bogazzi
a2f9c9f205
Fix image import from SVG when width/height are larger than element (#4450)
* fixed

* removed extra function;

* fix import of preserver

* added tests

* fixed test names
2017-11-12 01:30:22 +01:00
Andrea Bogazzi
ece82e6b94
stop searching target on mousemove on transform (#4442) 2017-11-08 21:00:56 +01:00
Andrea Bogazzi
ef85ed7eef
Ab webgl filter for resize (#4426)
* test another version

* a working webgl resize

* broke blur"

* broke blur"

* a working webgl resize

* better cache shader

* no dist

* better

* better2

* fixed tests

* linting
2017-11-04 11:57:05 +01:00
Sander Sink
1435e862d5 Downgrading webGL precision if target hardware does not support highest (#4433)
* Downgrading webGL precision if target hardware does not support highest

* moved webGlPrecision to fabric property
2017-10-31 21:48:51 +01:00
Andrea Bogazzi
a090a980d0 Fixing text insertion and deletion on edge cases. (#4420)
* fix insertion

* fixed forward delete on line start
2017-10-27 13:28:29 +02:00
Andrea Bogazzi
073a892993 more setCoords (#4419) 2017-10-27 11:14:59 +02:00
Stefan Hayden
863eec4303 object_stacking fix (#4394)
* when calling moveTo on an activeSelection the code should move the objects in the canvas._objects stack instead of moveing the objects in the activeObject._objects stack. This already works correctly for moveForward / moveBack / ect.

* Update activeselection.js

* fix trailing spaces

* Update activeselection.js
2017-10-27 09:40:47 +02:00
Andrea Bogazzi
40f16a9b4e Memoize transform and use transform for rendering (#4418)
* done

* done removed dist

* added some test
2017-10-27 09:01:32 +02:00
Andrea Bogazzi
3244f6c0ae Change the logic for setting dirty flag (#4417)
* test

* add better set support

* no build dist
2017-10-27 06:11:28 +02:00
Andrea Bogazzi
141f60aea7 Make generic _set aware of real change property (#4415)
* first change

* added a small test
2017-10-26 11:03:35 +02:00
Asturur
c6787042a9 fix lint 2017-10-25 23:39:19 +02:00
Melvyn Hills
0ddf90c255 Add browserShadowBlurConstant to adjust shadowBlur value (#4413)
* Expose browserShadowBlurConstant to adjust shadowBlur value (#4402)
* Add test for fabric.browserShadowBlurConstant
* added test description in case of failure
2017-10-25 23:33:58 +02:00
Andrea Bogazzi
2e337613b0 Fix set element not clearing webgl texture cache (#4410)
* fix and test

* fix test
2017-10-25 10:09:10 +02:00
Anton Pawlik
3efd895fe0 Fix comments about setOverlayColor (#4381) 2017-10-13 13:07:51 +02:00
Asturur
d1cff09104 fix mousemove and target 2017-10-09 02:11:15 +02:00
Andrea Bogazzi
b1f0f67669 fix the displacement of last or first point checking direction (#4377)
* fix the displacement of last or first point checking direction

* fixed doc
2017-10-08 20:04:31 -04:00
Andrea Bogazzi
32dea1ef0b Text minor changes (#4367)
* minor changes

* argh

* minor text changes
2017-10-01 00:13:56 -04:00
Stefan Hayden
8f4fb458bf change selectionKey interface to not be a breaking change but still accept an array (#4363) 2017-09-30 23:18:03 -04:00
Brian Chitester
d88af28af7 Allow multiple keys to enable multiple click selection (#4184)
* Allow multiple keys to enable multiple click selection

* backwards compatibility: allow string or array

* do isArray properly

* forgot a this.

* formatting...

* more formatting...
2017-09-29 13:40:36 -04:00
Wietse Wind
052631bdcb Fix IE rendering of SVG as overlay image (#4324)
* Fix IE rendering of SVG as overlay image

* Fix IE rendering of SVG as overlay image #2 - Fix coding syntax (CI)

* Fix IE rendering of SVG as overlay image #3 - Fix coding syntax (CI)

* Fix IE rendering of SVG as overlay image #4 - Moved to method 'loadImageInDom'

* Fix IE rendering of SVG as overlay image #5 - Moved some stuff around

* Fix IE rendering of SVG as overlay image #6 - Fixed the setTimeout (removed)

* Update misc.js
2017-09-29 00:36:00 -04:00
Andrea Bogazzi
3884824f46 Do not scale cache for transform target (#4358)
* no scaling cache for the current target

* .
2017-09-29 00:02:43 -04:00
Andrea Bogazzi
d4b51aec6c added old props to selection:updated and selection:created (#4357)
* added old props

* added a test
2017-09-28 23:53:07 -04:00
Andrea Bogazzi
d11c55e9cd Make scaleToWidth/scaleToHeight use the absolute parameter (#4350)
* added absolute param to scaleToWidth

* added simple tests
2017-09-28 23:25:20 -04:00
Stefan Hayden
0bb8a131a6 fixes problems with isTargetTransparent trageting. also nulls out cachedCanvas when not being used to make it easier to check if a proper cachedCanvas exists (#4356) 2017-09-28 22:28:08 -04:00
Andrea Bogazzi
cc7c36fa7d Added back target to object:modified (#4348)
* added back target

* Update canvas.class.js
2017-09-25 21:16:50 -04:00
Andrea Bogazzi
2c2111ebe3 Normalize selection events (#4340)
* different object managment
2017-09-25 15:14:15 -04:00
Andrea Bogazzi
dd6cbe93a2 Fix fast type in itext. (#4339)
* fix fast type
2017-09-23 00:39:20 +02:00
amadois
d7131d1cac corrected typo (#4328)
thanks
2017-09-20 19:27:03 +02:00
Andrea Bogazzi
ea93c288e8 fix-div-by0 (#4327) 2017-09-20 00:29:16 +02:00
Andrea Bogazzi
ad6521affb Paint order svg for CIRCLE, IMAGE and TEXT (#4320)
* added were missing
* added for image too
2017-09-18 00:14:08 +02:00
Stefan Hayden
0fc71349a6 Paint order (#4303)
* makes fabric aware of the paint-order svg2 spec to swap the paint order of stroke and fill
2017-09-17 22:47:35 +02:00
Andrea Bogazzi
ddb402730d Fix mouse:out on shift click selection (#4317)
* add hovered target when create active selection;

* selection and hovered

* added another assertion
2017-09-17 13:18:13 +02:00
Andrea Bogazzi
c03111824c Update deps (#4315)
* try replace tests
* modified tests for new qunit
* lint tests
2017-09-17 11:44:57 +02:00
Andrea Bogazzi
741fcbaa9a Fires selected for object included in drag area (#4314)
* added many tests
* linted tests
2017-09-16 23:31:11 +02:00
Andrea Bogazzi
9bd5e90840 Fix scale equally and double flip not happening (#4313)
* fix double flip

* fixed lint
2017-09-16 22:11:50 +02:00
Andrea Bogazzi
1b8786c706 Adding some tests on events firing (#4312)
* some tests on events

* fixed test linting
2017-09-16 20:27:45 +02:00
Andrea Bogazzi
87f4fc905b Add a new event and fixed the free drawing point displacement (#4311)
* things

* fixed drawing paths

* added jsdocs
2017-09-16 13:06:09 +02:00
Andrea Bogazzi
124da9ca26 backport subtarget fix 2017-09-09 00:29:10 +02:00
Andrea Bogazzi
0f265631b3 Compare distance between cursor with absolute value. (#4295)
* fix with Math.abs

* ok this works

* added test

* added test file

* linting tests

* wrong test
2017-09-07 12:59:02 +02:00
Andrea Bogazzi
545686ed96 Fix Safari svg whitespace (#4294)
* fix-whitespace

* fixed tests

* fixed doc
2017-09-07 12:02:56 +02:00
Andrea Bogazzi
0d36e565a9 improved docs, fixed dirty on group destroy (#4293) 2017-09-07 11:41:03 +02:00
Tristan Fischer
e2f44cc76b fix object.getObjectOpacity() docs (#4277) 2017-09-06 12:38:49 +02:00
Andrea Bogazzi
860b7a74c0 mousemove and svg export (#4283) 2017-09-06 12:38:12 +02:00
Andrea Bogazzi
a72d9630f6 try with mouseout (#4275) 2017-08-31 23:18:59 +02:00
Andrea Bogazzi
5bab9b84b2 fix path exports svgs (#4274) 2017-08-31 22:59:22 +02:00
Tristan Fischer
5f7e61f02f fix typo in shadow docs (#4271) 2017-08-31 22:33:10 +02:00
Andrea Bogazzi
4e438cac7b improved condition (#4258) 2017-08-29 22:35:02 +02:00
Andrea Bogazzi
db6510be67 adds , {backstoreOnly: true} for toDataURL export (#4254)
adds the backstoreOnly to __toDataURLWithMultiplier's setDimensions calls to prevent the canvas from resizing in the browser window when the canvas.toDataURL() method is called per issue #4252
2017-08-29 22:25:59 +02:00
Andrea Bogazzi
69d377b992 Output version (#4251)
* output version in json

* fixed tests

* fixed lint
2017-08-29 22:23:42 +02:00
Andrea Bogazzi
678099ed21 Fix free drawing, fix minScaleLimit for textbox (#4250)
* fixed free drawing
* better handling of minscale limit
2017-08-25 10:43:24 +02:00
Asturur
ffe49ccf9c pass activeObject to event 2017-08-19 23:39:24 +02:00
Andrea Bogazzi
a15d480d07 fix dataurl and improve docs for move forward/backward (#4229)
* fix dataurl and docs
* fixed paths
2017-08-18 21:29:06 +02:00
Andrea Bogazzi
16f5baaf29 Fix group canvas propagation to sub objects (#4228)
* restore canvas prop

* add tests

* add tests
2017-08-18 20:43:39 +02:00
ncou
b663204002 Better mouse support when lockScalingFlip is true. (#4225) 2017-08-18 15:55:31 +02:00
ncou
e9a5d0000e Fix unicode space char (#4224) 2017-08-18 14:25:52 +02:00
Andrea Bogazzi
9fc678825e fix shader pick (#4207) 2017-08-16 10:16:59 +02:00
Andrea Bogazzi
3b10702512 Normalize Api for getSelectionStyles, setSelectionStyles (#4202)
* reworked the text selection

* reorganized api

* missing file

* fixed lint

* more test
2017-08-15 10:10:01 +02:00
Andrea Bogazzi
6b4d215162 Remove active property from objects (#4200)
* removed active
* removed active property
* removed active property
2017-08-14 15:12:58 +02:00
Stefan Hayden
b114d8d0ee Parser RegEx update (#4003)
* better regex and attribute validation as well as public accesss to the regex

* lint
2017-08-14 13:52:52 +02:00
Andrea Bogazzi
b7d9047c9c Put window.fabric under a build flag (#4199)
* moved global in a module

* fix package.json
2017-08-14 13:42:17 +02:00
Andrea Bogazzi
a06b568968 Improved selection flow (#4198)
* improved flow
* improved selection flow
* do not transform not selected objects
2017-08-14 13:29:32 +02:00
Andrea Bogazzi
4cccab8f51 Remove fabric.Object.remove (#4197)
* removed remove method

* removed remove method
2017-08-14 09:44:51 +02:00
Andrea Bogazzi
77632c6e0e fixed svg import again (#4196) 2017-08-14 09:35:19 +02:00
Andrea Bogazzi
1c0c12fe8a fix-text-pattern (#4194) 2017-08-13 23:05:40 +02:00
Andrea Bogazzi
03efa1801a Fixed style removal for wrapped textbox (#4193)
* fixed style backspace
* use numeric value to compare
2017-08-13 21:39:45 +02:00
Andrea Bogazzi
ffd2d3254c Fix block style insertion (#4192)
* fix style nsertion

* fixed tests from older changes

* fixed tests from older changes
2017-08-13 20:49:39 +02:00
Asturur
836bf158b9 setAngle => rotate 2017-08-12 13:48:01 +02:00
Asturur
1fd1ba3b55 fix typo in isRendering 2017-08-10 00:12:34 +02:00
Andrea Bogazzi
39321c7b34 Fix text copy paste when there is no style (#4185)
* fix

* removed dist build
2017-08-09 23:17:07 +02:00
Nick Swider
da27ef57c4 Add chaining to iText selection methods (#4178) 2017-08-09 09:05:40 +02:00
Andrea Bogazzi
ddb9896455 fix opacity (#4176) 2017-08-06 17:56:45 +02:00
Andrea Bogazzi
59e615024c Hue filter (#4175)
* added hue rotation

* added hue rotation
2017-08-06 17:23:42 +02:00
Andrea Bogazzi
b5323bd83e make function just create canvas (#4172)
* make function just create canvas
* added tests
* added tests
2017-08-05 21:32:03 +02:00
Andrea Bogazzi
5a791a8291 fixed origins (#4170)
* fixed origins

* fixed origins
2017-08-04 11:20:50 +02:00
Asturur
acd941925a fix typo in shaders 2017-08-04 08:47:27 +02:00
Andrea Bogazzi
eec7981eec added onSelect (#4168) 2017-08-04 08:45:32 +02:00
Andrea Bogazzi
e0546b0105 Fix bugs with new activeSelection (#4167)
* test

* fixes
2017-08-04 00:11:00 +02:00
Andrea Bogazzi
068c815340 Fix text insert on null, give default style to text (#4166)
* text style error
* change text init
* fixes
2017-08-03 23:23:42 +02:00
Andrea Bogazzi
c705c6b4d8 Fix custom build (#4165)
* Update misc.js
* move the line in correct place
2017-08-03 22:14:17 +02:00
Asturur
f86370582c changes to build file 2017-07-29 16:28:30 +02:00
Andrea Bogazzi
7b50999f83 Fixes some beta issues (#4148)
* fixed the image.toSVG
* fixed the image.toSVG
* fixes
2017-07-29 14:09:31 +02:00
neopheus
3b06e685ef Some modifications (#4137)
* unnecessary semicolon
* comment error
* expression simplified
* simply function
* jsdoc update
2017-07-29 11:41:32 +02:00
neopheus
1ab140c830 centerPont => centerPoint (#4132) 2017-07-24 11:30:09 +02:00
neopheus
4df632b93f Update comments (#4128)
* Update Doc

* Update Doc - 2
2017-07-24 11:29:46 +02:00
neopheus
9965002e9f Add Color CSS3 (#4130)
* Update Color names CSS3 - https://www.w3.org/TR/css3-color/#svg-color

* reformat code

* reformat code - update
2017-07-24 11:28:57 +02:00
Andres
096a5d3214 Fixed typo in createImageData (#4121) 2017-07-22 20:56:19 +02:00
Andrea Bogazzi
351e7dfa47 Multiple fixes (#4119)
* multiple fixes
* updated tests
2017-07-22 16:34:47 +02:00
Andrea Bogazzi
c9b562de9e Remove activeGroup functionalities from Group, create ActiveSelection class (#4076) 2017-07-22 11:37:17 +02:00
Stefan Hayden
91376732ac bugfix for group.fromObject (#4111) 2017-07-22 01:23:28 +02:00
Andrea Bogazzi
5367cfa8e3 Add tests for sourcePath changes (#4108)
* modified path
* added tests
2017-07-18 08:38:19 +02:00
Justin Parker
6702fe6dc6 Use generic setter for sourcePath (#4093) 2017-07-15 13:37:36 +02:00
0s1r1s
b06d4ed785 Add missing double quotes (#4096)
The 'width' attribute didn't close inside toSvg function
2017-07-15 13:34:14 +02:00
Andrea Bogazzi
392e21312b introduce break test (#4102) 2017-07-15 13:21:59 +02:00
Justin Parker
0547bdf656 Font cache: no lower case of fontWeight (#4097)
* Font cache: no lower case of fontWeight
2017-07-15 12:29:20 +02:00
Scott Seaward
a06ea03451 Improve performance of copyGLTo2D in Firefox & potentially other browsers (#4086)
Why:

* When filtering with webgl copying data to 2d canvas from GL context dominates the filtering time
* Chrome is happy to copy data from GL with ctx.drawImage in sub-millisecond time
* Firefox performs drawImage much more slowly but can do putImageData fast instead
* Using putImageData results in ~ 2-3x speedup on Firefox 54 in the fabricjs.com filtering demo on my MacbookPro

This change addresses the need by:

* Adding a runtime check for which copy func is better performing
* Swapping drawImage for putImageData if that func is detected as being faster

Also submitted for review:

* Log minifier error output to console if build.js minifyCmd fails (helps identify syntax errors while using build:watch)
2017-07-12 22:28:40 +02:00
Andrea Bogazzi
fd0665b434 Update canvas.class.js 2017-07-07 15:29:13 +02:00
Andrea Bogazzi
586e61dd28 Move all automatic renderAll to requestRenderAll (#4072)
* move to requestRenderAll
2017-07-04 23:13:10 +02:00
Andrea Bogazzi
6962f8e6f2 Add blendImage filter (#4071)
* start blend filter
* change some doc
2017-07-04 19:53:45 +02:00
Andrea Bogazzi
e93f6f4ffc change animation (#4068)
* change animation
* added params to object.animate
2017-07-04 00:28:49 +02:00
Andrea Bogazzi
240a1e4d3c Fix cursors (#4067)
* test1
* fixed cursor
2017-07-04 00:26:00 +02:00
Andrea Bogazzi
d106051554 Remove accessors (#4065) 2017-07-03 17:02:44 +02:00
Andrea Bogazzi
03e504303c Cursors not allowed (#4064)
* what so far
* not-allowed cursor
2017-07-03 15:10:49 +02:00
Andrea Bogazzi
b841be66de Remove delegated properties from groups (#4062)
* changed code
* added small test
* first step to group simplification
* first step to group simplification
* removed test
2017-07-03 13:44:48 +02:00
Andrea Bogazzi
4c2e83d089 add cleanStyle, removeStyle (#4060)
* add cleanStyle, removeStyle
* added semi colons
2017-07-03 12:20:27 +02:00
Andrea Bogazzi
c41ef91fca Image meet or slice with cropX and cropY value (#4055)
* working example
* fixed tests
2017-07-03 12:20:10 +02:00
Andrea Bogazzi
192672abb0 add event to object modified (#4061) 2017-07-03 12:18:04 +02:00
Andrea Bogazzi
5e7e665eb8 made keymap public (#4053)
* made keymap public
* better docs
2017-07-01 16:25:10 +02:00
Andrea Bogazzi
f6a7c298b9 Textbox can scale as a normal object. (#4052)
* enabletextbox-scaling
2017-07-01 16:03:51 +02:00
Andrea Bogazzi
98ed4cc351 Fix a bug in recent caching changes (#4051)
* small fix
* fixed and added tests
* comeon andrea wake up
2017-07-01 14:33:47 +02:00
ncou
4a8df81c4b fixed typo (ingoreVpt to ignoreVpt) (#4048) 2017-06-30 16:11:13 +02:00
Andrea Bogazzi
ede5d8476c Increase cache canvas in steps, do not increase every mouse move (#4037)
* first try

* step increase size of canvas

* removed console.log
git push
2017-06-27 08:43:55 +02:00
Andrea Bogazzi
6185b07408 Limit cache size to upper and lower limit (#4035)
* just name change

* help

* test difference

* ok better limiting

* fix lint
2017-06-25 14:50:28 +02:00
Andrea Bogazzi
46af53a95b Name change of some caching method (#4034)
* just name change
* fixed test
2017-06-25 12:52:59 +02:00
Andrea Bogazzi
7a88afb2d3 Fix some caching in group issues related to deep checks (#4032)
* backport
* better fix
2017-06-24 23:10:55 +02:00
Andrea Bogazzi
efc2a216c7 fix noise (#4031) 2017-06-23 21:12:57 +02:00
Andrea Bogazzi
f99b0d78f3 fixed the glShaders (#4023) 2017-06-20 23:36:26 +02:00
Roger Beaman
5de811f098 adding-data-attribute-for-hidden-textarea (#4022) 2017-06-20 18:47:11 +02:00
Andrea Bogazzi
da9161e48f Minimize delay between clear and re render. (#4007)
* moved clear later

* moved clear later
2017-06-14 22:22:23 +02:00
Stefan Hayden
3cee915a6b return all svg elements as a 4th function param when loading an svg (#4002) 2017-06-14 21:53:11 +02:00
nickvans
8cc52e0966 Update rgba regex to account for alpha (#4006)
* Update rgba regex to account for alpha

Previous regex would fail for an rgba string with a non integer alpha value. "rgba(255, 128, 64, .5)"

* Create color.js

* Create color.js
2017-06-14 21:50:27 +02:00
Stefan Hayden
a1ccf7155b path is the only object that inherits from Object but does not call super. it should also call super for consistancey and to allow overriding of the object initialize prototype (#4005) 2017-06-14 18:31:42 +02:00
Andrea Bogazzi
57cc67300f add dblclick event support (#3998)
* added double click

* added double click
2017-06-12 00:03:35 +02:00
Andrea Bogazzi
5f57659149 Enable request animationFrame for mouse interaction (#3997)
* switch to request animation frame

* added request animation frame

* fix
2017-06-11 23:16:46 +02:00
Andrea Bogazzi
145bd3b03f Force async (#3996)
* removed forced async
* tests
* fixed lint
2017-06-11 21:36:51 +02:00
Andrea Bogazzi
69f37b0a4f restored path restore from string 2017-06-11 18:15:29 +02:00
nurbs999
3987c962dd Do not enforce action as string (#3992)
* Do not
2017-06-09 09:56:22 +02:00
Andrea Bogazzi
7cb2e647a9 backport (#3988) 2017-06-07 15:47:32 +02:00
Andrea Bogazzi
cd18c1501f removed extra creations (#3985) 2017-06-07 14:19:46 +02:00
Andrea Bogazzi
9cae49510f stop double binding (#3983)
* stop double binding
2017-06-07 14:07:38 +02:00
Andrea Accardo
2b1ffd45cc Update canvas_events.mixin.js (#3953)
Allow to display custom cursor also for unselectable items
2017-06-07 10:15:40 +02:00
Andrea Bogazzi
da7ba025a1 missed one parseSVGDoc (#3977) 2017-06-01 15:28:37 +02:00
Andrea Bogazzi
5e52cc4a94 Fix controls override (#3976)
* overrides really override

* fixed all overrides
2017-06-01 15:15:08 +02:00
Andrea Bogazzi
ec2a716344 fixed error in image render (#3975) 2017-06-01 14:53:36 +02:00
Andrea Bogazzi
6476506a3c fixed extra animations (#3974) 2017-06-01 14:50:17 +02:00
Andrea Bogazzi
5a86ad9f07 bring out element chain (#3973) 2017-06-01 14:45:50 +02:00
Andrea Bogazzi
7517b951ab Remove PathGroups for Groups. (#3969)
* removed pathGroups
2017-06-01 11:02:32 +02:00
Andrea Bogazzi
e96ccf9ea6 new filtering with webgl (#3915) 2017-05-29 18:28:24 +02:00
Andrea Bogazzi
a8db7b3523 Fix #3905 add an additional setCoords at the end of addWithUpdate/removeWithUpdate (#3911)
* added setCoords

* removed extra setCoords

* so tired i cannot read

* added test
2017-05-06 19:54:42 +02:00
Andrea Bogazzi
0f559ad84f removed saveCoords hasMoved (#3910)
* removed method
* deleted tests
2017-05-06 19:16:03 +02:00
Andrea Bogazzi
ce996e2ec6 fix 3906 moved target cancellation up so (#3909)
* moved target cancellation up
* added tests
2017-05-06 15:03:07 +02:00
apgeo
e8766af559 Updated fiddle describing originX/originY usage (#3907)
The old fiddle did not work because of now inexistent fabricjs dependency script
2017-05-06 13:05:53 +02:00
Andrea Bogazzi
95d07a97ba small changes (#3908) 2017-05-06 13:05:07 +02:00
Andrea Bogazzi
19c18a512d Fix groupSelector on editing Text (#3901)
* fix for drag on editing text

* updated test
2017-04-30 21:21:52 +02:00
Andrea Bogazzi
4638459dac Add more information to mouseOver mouseOut events. (#3900) 2017-04-30 20:39:15 +02:00
Andrea Bogazzi
b4761f3459 only one object for style (#3899) 2017-04-29 20:26:33 +02:00
Andrea Bogazzi
ee323e126f Give a way to draw controls programmatically (#3887)
* changes to control rendering

* changes

* moved render all after the events

* more changes

* removed console.log
2017-04-29 20:08:23 +02:00
Andrea Bogazzi
977d71de6e Added isClick boolean to mouseUp events on left click (#3898)
* added test

* removed useless method
2017-04-29 10:05:23 +02:00
Andrea Bogazzi
d1ec14f2de Allow group selection start on non selectable object (#3892)
* allow selection start on non selectable obkect
* fixed lint
2017-04-27 23:03:00 +02:00
Andrea Bogazzi
6139af3a1c Stop text from firing mouse up and mouse down on non left clicks (#3888)
* fix right click mouse up

* block mouse up/down for text on non left click

* fixes also deactivteAllWithDispatch
2017-04-26 12:59:33 +02:00
Stefan Hayden
ca95fb513b initDelayedCursor() will abort and then restart the cursor animation (#3879) 2017-04-24 22:57:11 +02:00
Andrea Bogazzi
4d4b8f1088 added missing functions (#3877) 2017-04-24 09:48:56 +02:00
Andrea Bogazzi
17035c7480 reduce angle calculation error for cosin of 90 and 270 degrees (#3872)
* reduce angle calculation error

* reduce angle calculation error
2017-04-24 02:13:18 +02:00
Andrea Bogazzi
79c21cf188 pass event to functions (#3871) 2017-04-23 23:58:47 +02:00
Andrea Bogazzi
ff2909ebf8 fixed cache for first draw (#3870)
* fixed cache for first draw

* fixed tests
2017-04-23 13:44:22 +02:00
Asturur
1e057a0bbf renamed char in _cahr 2017-04-23 11:28:57 +02:00
Andrea Bogazzi
eb3d7496ca fix caching widths (#3868) 2017-04-23 11:18:47 +02:00
Asturur
879d5b4e66 built beta.1 with isNaN fix 2017-04-23 08:46:53 +02:00
Andrea Bogazzi
630ed86d9e fix toSVG polygons and other bugs (#3866) 2017-04-22 22:46:45 +02:00
Andrea Bogazzi
ea17776d28 Do not cache group if a child has shadow. (#3864)
* fix caching with shadows
* add travis install for canvas
2017-04-22 20:59:34 +02:00
Andrea Bogazzi
d95612e3c3 Issue 3832 Add toDatalessObject to Group class since it may contains pathGroups. (#3863)
* fix toDatalessObject

* added test
2017-04-22 15:15:01 +02:00
Andrea Bogazzi
ba19885256 fix-3482 (#3862) 2017-04-22 14:08:41 +02:00
Andrea Bogazzi
b112b3405f text rewriting - reorganization (#3676)
*text refactored.
2017-04-22 09:15:38 +02:00
Roger Beaman
e0e431ce78 fixing callSuper (#3844)
* fixing callSuper

* fixing lint

* fixed unexpected alias for this
2017-04-20 13:43:58 +02:00
Rob Hoffmann
6dd4b70b44 Update _fireOverOutEvents to pass event object (#3853)
I encountered a scenario where we were listening for `mouseout` and calling `_isObjectMoved` expecting an event object to be passed from the `mouseout` listener, however the object was not passed from `_fireOverOutEvents`. Normally this would not be an issue as `_isObjectMoved()` -> `getPointer()` checks for `fabric.window.event` and uses that if `event` is undefined, but this produces an error in Firefox as the `window.event` property is not implemented (https://developer.mozilla.org/en-US/docs/Web/API/Window/event).

To resolve this I am proposing that `_fireOverOutEvents` pass along the event object to the target so that it can be passed along to `isObjectMoved()` if necessary.
2017-04-20 13:43:45 +02:00
ncou
de39c3c148 remove unused "originalState" var (#3836) 2017-04-09 01:01:36 +02:00
Andrea Bogazzi
f877f52f2a fix gradient toSVG for radial gradients (#3807)
* support svg crossorigin on images
* fix gradient export
* added tests
2017-03-26 10:22:10 +02:00
Asturur
e4a42e054f support svg crossorigin on images 2017-03-25 18:45:54 +01:00
Andrea Bogazzi
c145ac26f2 fixed dirty (#3782) 2017-03-14 23:36:48 +01:00
Andrea Bogazzi
e5b5e92530 Revert 3754 modal textarea (#3780)
* Revert "Update path.class.js (#3774)"

This reverts commit a7ff845165.

* Revert "switch to canvas prebuilt (#3757)"

This reverts commit b979bd5861.

* Revert "Fix textarea focus bug when canvas is in an element that stops events from reaching the body (#3754)"

This reverts commit 3f9b69fe80.
2017-03-14 23:11:50 +01:00
by12
a7ff845165 Update path.class.js (#3774) 2017-03-14 21:42:07 +01:00
Andrea Bogazzi
b979bd5861 switch to canvas prebuilt (#3757)
* swithced to canvas prebuilt

* try 2

* remove toolchanin needed to setup canvas
2017-03-14 12:37:07 +01:00
kghandi
3f9b69fe80 Fix textarea focus bug when canvas is in an element that stops events from reaching the body (#3754)
See example: https://jsfiddle.net/kghandi/jhd6xn4x/

* remove comments

* Update fabric.js

manually updated fabric.js for testing, since I don't know how to do a build.

* Revert "Update fabric.js"

This reverts commit d4f8e2c6a44aa4be92a3dced85020241fac0ea29.

* Resolve unit test failure for textarea focus patch

Reference lowerCanvasEl instead of upperCanvasEl so the patch works for
StaticCanvas.

* Resolve unit test failure for textarea focus patch

Check for this.canvas initialized.

* Resolve unit test failure for textarea focus patch

* Resolve unit test failure for textarea focus patch

* Fix positioning of hiddenTextArea

* Update itext_behavior.mixin.js
2017-03-14 12:36:38 +01:00
Andrea Bogazzi
efcd946b48 fix setSelectionStyles do not set anything when there is no selection (#3765)
* fix setSelection
* fixed tests
2017-03-06 01:15:24 +01:00
Andrea Bogazzi
50180a1111 Added middle click mouse down managment (#3764)
* added test
* fixed test
2017-03-06 00:12:44 +01:00
Andrea Bogazzi
0d0f5c5e63 Better offscreen detetion, added parameter to skip offscreen rendering. (#3758)
* added check for offscren

* changes

* better onscreen detection

* fix lint
2017-03-03 16:42:14 +01:00
Andrea Bogazzi
7733dea5c1 Refocus textarea on mouseout from canvas (#3759)
* add focus on moouse out

* fix mouse out lost focus
2017-03-03 14:33:46 +01:00
Andrea Bogazzi
211edecdfd Fix opacity parsing from classes and from fill-opacity (#3747)
* fix to parser

* fix opacity parsing

* fix opacity parsing

* added tests

* fix for parsing attributes equalt to 0

* added test

* fixed better

* removed fix
2017-02-27 02:18:23 +01:00
Andrea Bogazzi
c3a6447aff fix text coordinates on init (#3745)
* fix text coordinates on init

* added small test

* fix test lint
2017-02-27 02:02:30 +01:00
Edwin Guzman
1f55de07c4 Fix problem on fabric.Line controls and line.getWidth() (#3742)
* feat(pr/fixLineWidth) Fix problem on fabric.Line controls and line.getWidth()

* fix line boxes and svg import
2017-02-25 15:17:24 -05:00
Andrea Bogazzi
14e8826173 text fixes to style (#3743) 2017-02-24 23:01:33 -05:00
Stefan Kienzle
79c5d734c8 Fix loadFromJSON default values for fill and stroke (#3735) 2017-02-22 20:10:54 -05:00
by12
45c868cd2b Update path_group.class.js (#3728) 2017-02-21 07:16:22 -05:00
Andrea Bogazzi
22465346fc add safe check for activeObject 2017-02-19 23:52:53 -05:00
Andrea Bogazzi
214a169767 Removed es5 shim function and support for ie < 10 (#3722)
* removed es5 part
* removed json shim
* removed node 5
* removed node 5
2017-02-19 19:47:39 -05:00
Andrea Bogazzi
f85bdc75c6 Update path.class.js (#3713) 2017-02-19 17:29:03 -05:00
Andrea Bogazzi
74d8e02267 fix for bluriness (#3721) 2017-02-19 17:08:15 -05:00
Andrea Bogazzi
7a987faef2 changes (#3717) 2017-02-18 23:47:32 -05:00
Andrea Bogazzi
54f76a1066 Firedeselectedalsowithmouse (#3716)
* added code

* added test
2017-02-18 23:03:23 -05:00
Andrea Bogazzi
ff0b6f0a50 make cacheCanvas created on the fly if needed (#3706) 2017-02-16 17:19:32 -05:00
Andrea Bogazzi
5aeb2a619d add condition on angle transform (#3704) 2017-02-16 16:32:52 -05:00
Andrea Bogazzi
085a3c75fc Do not fire selection changed if we are not editing (#3702)
* Do not fire selection changed if we are not editing
* fire selection changed event after enter editing
* fix tests

* fixed trailing space
2017-02-16 16:16:43 -05:00
Andrea Bogazzi
c9e50febad add needsItsOwnCache property (#3703) 2017-02-16 15:36:45 -05:00
Stefan Hayden
eb6815a972 Draw consecutive textBackgroundColor in style with one draw call (#3698) 2017-02-16 13:44:54 -05:00
Andrea Bogazzi
5cd1111195 fix reload from json (#3691)
* fix reload from json

* fix just on path
2017-02-14 00:40:02 -05:00
Andrea Bogazzi
7ff1063c07 passivefalseeverywhere (#3690)
* passivefalseeverywhere

* Update canvas_events.mixin.js

* Update dom_event.js

* Update canvas.class.js
2017-02-13 23:35:35 -05:00
Andrea Bogazzi
91c851a333 fire deselected on activeObject switch. (#3689)
* misc changes

* fire the selection on target swap

* manag exitEditing without events

* onDeselect

* onDeselect
2017-02-13 07:47:59 -05:00