Commit graph

2716 commits

Author SHA1 Message Date
Andrea Bogazzi
2c814db928 Better deep object cloning and savestate check (#3434)
* fixed deep cloning with function removed array ordering
* added tests
2016-11-20 19:11:20 +01:00
Andrea Bogazzi
f306328b6d Add better jsdoc to util.object.extend 2016-11-15 09:08:47 +01:00
Asturur
11dc62c0f3 add options to bounding rect 2016-11-14 23:47:14 +01:00
Asturur
60c48ece8d separate set coords from calculation 2016-11-14 23:23:18 +01:00
Asturur
e853f99d3b fixes typo 2016-11-14 23:17:44 +01:00
Asturur
f6e5a8e265 rework coords for groups 2016-11-14 23:14:10 +01:00
Andrea Bogazzi
9422fd39be Objectcaching (#3317) 2016-11-13 21:00:10 +01:00
Marcin
f26a2dc8aa Word widths on justified line of text were calculated incorrectly. (#3408)
* Calculation of word widths on justified line will now correctly take styles into account
* fix lint
2016-11-13 00:35:40 +01:00
Andrea Bogazzi
c5f60743f5 To object origin (#3416)
* deleted double default cleaning
* rework object export
* fixed tests
* fix fabric2 api change.
* removed unused var
2016-11-12 23:54:42 +01:00
Andrea Bogazzi
1278677a97 includeDefaults for background and overlay (#3415)
* reuse code for _toObject
* added small test
2016-11-12 18:20:20 +01:00
Stefan Hayden
5915ca8d38 Trigger mouse over on canvas enter (#3389)
* fire a mouse:over event once when mouse enters the canvas
* only fire if we don't find a target
* only fire if we find no target and set the hoveredTarget to null
2016-11-01 11:11:01 +01:00
Joe Sullivan
d69d471db0 Grab target and pointer above right-click logic (#3381) 2016-10-29 16:52:30 +02:00
Andrea Bogazzi
17ad7896fc fix itext clear area (#3388)
* fix itext clear area
* fix overlapping bg colors

* do not commit dist
2016-10-29 16:41:44 +02:00
Stefan Hayden
10703055c0 adding object properties of snapAngle and snapThreshold to enable object snapping. (#3383)
* adding object properties of  and  to enable object snapping.
2016-10-29 09:55:41 +02:00
Andrea Bogazzi
273b2cd2d2 Add jsdoc to modifier keys (#3373) 2016-10-25 17:56:39 +02:00
Andrea Bogazzi
98c3291806 fix saturate filter (#3351) 2016-10-17 11:49:55 +02:00
Andrea Bogazzi
28c2654a23 Ver166 (#3350)
* ver 166
2016-10-16 23:40:02 +02:00
Andrea Bogazzi
ddc8a028de fix mouse:move removal (#3349) 2016-10-16 20:56:15 +02:00
Andrea Bogazzi
e54dc3bffb restored path parsing cache (#3347)
* restored path parsing cache
* Update arc.js
2016-10-15 23:45:47 +02:00
Andrea Bogazzi
7af65b05bd Fix event listeners after itext removal (#3345)
* fix function naming
2016-10-15 13:26:25 +02:00
Andrea Bogazzi
4459ae4b81 Contrast & saturation (#3341)
* added filters

* tweak

* fixed docs
2016-10-15 12:02:40 +02:00
Timo Höpfner
37976d55b3 FIX for toDataURL cropping (#3335)
* FIX for toDataURL cropping
* Unit test for toDataURL cropping
2016-10-11 11:05:20 +02:00
Andrea Bogazzi
8783b2132c change how itext handle removal handlers (#3332)
* change how itext handle removal handlers
* fix test lint
2016-10-09 09:25:43 +02:00
Andrea Bogazzi
84b012f9ce Versione 1.6.5 (#3316)
* fix to doc
* ver 165
2016-10-02 21:35:37 +02:00
Andrea Bogazzi
bb41cdfa4d remove space at start of line (#3315) 2016-10-02 19:58:34 +02:00
Andrea Bogazzi
49c7858596 changed to dataurl export (#3314)
* changed to dataurl
2016-10-02 19:37:20 +02:00
Andrea Bogazzi
b46c5b4ca3 remove unused function in staticCanvas (#3313)
* remove unused function in static
* fixed svg export
2016-10-02 12:12:42 +02:00
Andrea Bogazzi
cd4c465f4c fix text minimum dimensions (#3312)
* fix text dim
* add tests
2016-10-02 11:00:17 +02:00
Andrea Bogazzi
224309a4c7 fix src to svg (#3310) 2016-10-02 09:38:31 +02:00
Andrea Bogazzi
51835c1224 use native stroke dash for selection area (#3309)
* use native stroke dash for selection area

* check support at init
2016-10-02 09:31:32 +02:00
Andrea Bogazzi
89593190bb added right click fire (#3308) 2016-10-01 20:25:47 +02:00
Andrea Bogazzi
8190aa7568 remove canvas reference on object removed (#3307)
* remove canvas reference on object removed

* remove canvas after event fire
2016-10-01 17:45:52 +02:00
Andrea Bogazzi
43813adbdf Update clear methd (#3305)
* Update  clear method
2016-10-01 14:23:27 +02:00
Andrea Bogazzi
e0f687298c add canvas offset to textarea position (#3306) 2016-10-01 14:05:46 +02:00
Marcin
a8827e7a5c fixes Issue 3256 - line's style was gone when pushing line down (#3277) 2016-09-25 22:13:35 +02:00
Andrea Bogazzi
06a4207d25 added event firing for shortcuts (#3285) 2016-09-25 22:10:31 +02:00
Andrea Bogazzi
bda846b41a reverted font changes (#3276) 2016-09-19 09:44:42 +02:00
Andrea Bogazzi
07094a4ec5 fixed behaviour of shift click and shift keys (#3274)
removed some glitches, removed duplicate code
2016-09-18 23:22:49 +02:00
Andrea Bogazzi
77f37db3c9 fix shift click (#3270) 2016-09-17 23:56:55 +02:00
Andrea Bogazzi
437eea118f allow for deep state check and save (#3262) 2016-09-15 12:49:25 +02:00
Andrea Bogazzi
c34027cdfd fixed selection, added test (#3254) 2016-09-11 21:28:48 +02:00
Andrea Bogazzi
aa53e08a6b isContainedWithinObject on coords instead of bounding rect (#3252)
* update function and test

* fix interset with object and overlap
2016-09-11 16:01:23 +02:00
Andrea Bogazzi
5d0bf5a166 add custom properties to bg and overlay (#3250) 2016-09-11 12:40:57 +02:00
Andrea Bogazzi
d7157d122c move backgroundColor to all classes (#3248) 2016-09-11 11:45:25 +02:00
Andrea Bogazzi
876c9ca91f Uniform clone and fromObject behaviour (#3212) 2016-09-10 16:09:17 +02:00
Andrea Bogazzi
08f60adbea switch to eslint (#3229)
* switch to eslint 2.x
* fix src
* fix tests
2016-09-10 15:14:23 +02:00
Andrea Bogazzi
86e99899bc Update image.class.js 2016-09-05 20:18:50 +02:00
Andrea Bogazzi
5dbbcdb682 Update itext.class.js 2016-09-05 20:01:32 +02:00
Andrea Bogazzi
c5175d66e9 Update text.class.js 2016-09-05 19:52:59 +02:00
Andrea Bogazzi
42d8f3e463 Fix textbox and negative charspacing (#3233)
* do not count charspacing twice
* do not get negative with char width
2016-09-05 18:26:15 +02:00
Asturur
a1e5d518bf fixed tests for browser 2016-09-01 08:31:56 +02:00
Andrea Bogazzi
bba8b3a705 bring callback toapplyfilters (#3210)
* bring callback toapplyfilters
2016-08-28 22:42:41 +02:00
Andrea Bogazzi
148b5c1434 Make object fire deselect event (#3195) 2016-08-28 22:25:51 +02:00
neopheus
37689f52eb Update Wheel event (#3204)
rename mousewheel -> wheel
2016-08-27 18:13:02 +02:00
neopheus
2570b548a7 Lerp - lock t between 0 and 1 (#3188)
* lock t between 0 and 1
* Add New Unit Test for lerp (min, max t)
2016-08-26 15:41:22 +02:00
neopheus
a6bc04ce8d Add Hex Color RGBa (#3202)
* Add RGBa (8 digits, #FF5544CC, 4 digits #F54C);
2016-08-26 10:46:14 +02:00
Andrea Bogazzi
27f9214d94 Update text.class.js 2016-08-23 11:19:52 +02:00
Andrea Bogazzi
ff56ad583e Make text use default setStrokeDash function 2016-08-23 10:49:14 +02:00
Andrea Bogazzi
17d7f929d5 Update collection.mixin.js (#3174)
* Update collection.mixin.js
2016-08-22 11:51:59 +02:00
neopheus
5db01369e4 Check code 2 (#3186)
* JSDoc update + same name for variables
2016-08-22 11:36:30 +02:00
Andrea Bogazzi
702126eb85 Change getFontDeclaration (#3191)
* Change getFontDeclaration
2016-08-22 11:27:34 +02:00
Kyle Herock
181cdec80c give getSrc a better role in this class. (#3189) 2016-08-22 10:43:17 +02:00
neopheus
3544b727be Update code v2 (#3180)
* update JSDOC - v4
* update JSDOC -v5
2016-08-20 17:58:16 +02:00
neopheus
9b383628e8 JSdoc update (#3179)
* update JSDOC

* update JSDOC - v2

* update JSDOC - v3
2016-08-20 12:05:19 +02:00
Andrea Bogazzi
fd6038d50d no need to render if nothing happened 2016-08-18 07:58:35 +02:00
Andrea Bogazzi
9a595f7037 forgot to export charSpacing value in toObject Method 2016-08-18 07:54:59 +02:00
Andrea Bogazzi
46624d3f50 Textspacing (#3097)
Introduce charspacing.
2016-08-14 23:19:42 +02:00
Andrea Bogazzi
cf5f327f55 Extending test coverage (#3148)
* adding tests
2016-08-14 11:05:44 +02:00
Stefan Dietz
c0f5dc3eb0 Change borderScaleFactor behaviour (#2930) (#3154) 2016-08-12 00:14:12 +02:00
Andrea Bogazzi
a2b4ef564b Add enableRetinaScaling to cloneAsImage (#3147)
* Add enableRetinaScaling to cloneAsImage
* added test
2016-08-08 07:17:39 +02:00
Andrea Bogazzi
c36225015a initialized body variable 2016-08-07 22:37:26 +02:00
Andrea Bogazzi
48a6c9c67f fix insert at (#3146) 2016-08-07 22:30:05 +02:00
Juan Basso
201a8c7f65 Added missing object:added on docs (#3145)
`object:added` is also fired by canvas.
2016-08-07 22:01:09 +02:00
Andrea Bogazzi
ad7e56422a Get pointer change (#3144)
* fix normalized pointer
* more tests
2016-08-07 17:00:58 +02:00
Simon Kunz
03d27681c3 Add Color Matrix filter class (#3139) 2016-08-03 07:26:30 -04:00
Scott Seaward
ebb2552357 IE replace text selection with keypress (#3137)
Why:
* After creating a textbox, selecting text, and pressing a key, the first character of the previous text would remain.
* This happened because the hidden textarea would not update its selection in IE when it was in the same parent element as the canvas.
This change addresses the need by:

* Keeping the hidden textarea in the body element.
* IE now correctly updates the text selection as the user interacts with the canvas textbox.
2016-08-01 16:46:40 -04:00
Andrea Bogazzi
9e4ed9565f fix cursor left without shift (#3135)
* fix cursor left and added missing test
2016-07-31 23:32:10 -04:00
Andrea Bogazzi
d93f91febc Start to cleant setSelections (#3119) 2016-07-31 12:21:52 -04:00
Andrea Bogazzi
948019f622 add object scaling function (#3134)
* add object scaling function

* Update object.class.js
2016-07-30 12:04:38 -04:00
Andrea Bogazzi
9e5f3ab7b9 numeric origin (#3121)
* Numeric object origin add tets
2016-07-25 10:07:50 -04:00
Andrea Bogazzi
9980c83fb9 move the pathCommands out of render
makes easier to override, extend the class.
2016-07-22 11:10:30 +02:00
Andrea Bogazzi
f9782cf788 Update canvas_events.mixin.js 2016-07-22 11:07:29 +02:00
zntus
d4f0b52f18 Fix Rect imported from svg is invisible when display = "none" (#3106) 2016-07-18 10:05:14 +02:00
Andrea Bogazzi
7dad30c156 support style merging from css (#3114)
* supportstylemerging
* added test
2016-07-18 08:56:40 +02:00
Andrea Bogazzi
dde9eaa4e3 fix pattern brush (#3112) 2016-07-17 11:55:36 +02:00
Andrea Bogazzi
6601af9340 gradientInfinity (#3082)
* gradientInfinity
* updated tests
2016-07-17 10:31:51 +02:00
Andrea Bogazzi
72a6c273bf remove lastRendered logic (#3111) 2016-07-17 08:35:18 +02:00
Andrea Bogazzi
51995a73d8 fix perPixelTargetFind (#3109) 2016-07-16 17:25:34 +02:00
Andrea Bogazzi
6e1d2e2fd2 fix for lineheight and text selection (#3094) 2016-07-10 23:04:46 +02:00
Andrea Bogazzi
98f2d1b3dd ignore svg namespace (#3081)
* ignore svg namespace
2016-07-03 23:52:25 +02:00
Andrea Bogazzi
725d48771f Bump to 1.6.3 (#3080) 2016-07-03 13:52:08 +02:00
blucobalto
cf95dd45c9 FindTarget patch 1 (#3077)
define pointer before running findTarget
2016-07-03 09:15:09 +02:00
Andrea Bogazzi
4433809cb1 fix lineheight < 1 (#3078) 2016-07-02 19:23:36 +02:00
Kyle Herock
62da4fd6cd Apply viewport transform when calculating isTargetTransparent (#2980) 2016-07-02 10:45:11 +02:00
Andrea Bogazzi
2cd06c915d fix selection background on zoomed canvas (#3076) 2016-07-02 09:07:53 +02:00
Andrea Bogazzi
f1ff91dbc3 Fix targets undefined 2016-07-01 09:50:42 +02:00
Andrea Bogazzi
5166ab76c8 update clear method to clear lastRenderedWithControls (#3058) 2016-06-20 07:32:12 +02:00
Andrea Bogazzi
be8dfae17e Various fixes (#3057)
Fixes hidden textarea positioning, rendering fixes during canvas zoom.
2016-06-19 23:33:54 +02:00
Andrea Bogazzi
77dab21155 Additional method for centering objects (#3044) 2016-06-11 14:10:20 +02:00
Andrea Bogazzi
9ef51ff77d load from options after the load backroung in the callback (#3029)
moved the load of the custom properties load after the callback
Added tests
2016-06-05 17:08:19 +02:00
Scott Seaward
da42b293d3 Remove reference to lastRenderedWithControls when that object is deleted (#3023) 2016-06-02 11:06:36 +02:00
Andrea Bogazzi
0c6a665bcb Target in group (#2997)
Added gorup.subTargetCheck, fixed transparent target selected on mouse up, fix text grouping while editing
2016-05-31 11:41:02 +02:00
Andrea Bogazzi
5a6b11ef50 introduce a parameter to choose behaviour of background and overlay (#3019)
* introduce a parameter to choose behaviour of background and overlay
2016-05-30 23:33:02 +02:00
Andrea Bogazzi
d4e723e49d update area clearing during rendering (#3016)
* update area clearing during rendering
* register event in correct way
* re render selection or cursor only if selectionStart changes
2016-05-30 23:22:55 +02:00
Andrea Bogazzi
64bf67b0ab remove Textbox instances (#3008) 2016-05-25 15:00:38 +02:00
Andrea Bogazzi
dd3e6a81e2 do not set background or overlay image if the load fails. (#3003) 2016-05-23 14:53:09 +02:00
Andrea Bogazzi
1843581488 Move charWidthCache from iText to fabric, allow single cache for font. (#2995)
divided cache in a single font cache objects, added method for clearing one font cache.
2016-05-23 08:16:59 +02:00
Andrea Bogazzi
dd0b9f63d3 fix multi line selection regression introduced with #2996 2016-05-21 16:07:00 +02:00
Andrea Bogazzi
dfb5e4e903 Clear only the itext area top context when animating cursor or selection (#2996) 2016-05-21 15:29:26 +02:00
Andrea Bogazzi
cfe0e27d19 Update itext_behavior.mixin.js 2016-05-21 15:15:44 +02:00
Andrea Bogazzi
eb9b7f45b9 Add ID to svg export (#2993) 2016-05-21 15:07:04 +02:00
Andrea Bogazzi
489230bdf5 add callback with null argument to failed xml load (#2994) 2016-05-21 14:34:17 +02:00
Andrea Bogazzi
f425966162 give text its own dimension function (#2992)
* give text its own dimension function
* updated tests after verifying that the svg import from element is better than previous
2016-05-21 13:05:59 +02:00
Andrea Bogazzi
e8a530019f remove deadcode (#2984) 2016-05-19 21:39:06 +02:00
Andrea Bogazzi
143c0758a7 add excludeFromExport property (#2976)
* add excludeFromExport property
* added test for SVG and JSON
2016-05-17 12:56:34 +02:00
Andrea Bogazzi
a0ba49ea5d Use reviver also for background and overlay image in svg export (#2975)
* Use reviver also for background and overlay image
2016-05-17 02:56:25 +02:00
Andrea Bogazzi
830838b037 Fix export of colors alwaus in rgb + eventually opacity. 2016-05-16 17:22:05 +02:00
Andrea Bogazzi
38bebc2fcb bump to 1.6.2 and build dist (#2973) 2016-05-15 23:59:26 +02:00
Andrea Bogazzi
11fd746c1e Use scaled canvas dimensions (#2972) 2016-05-15 13:07:32 +02:00
Andrea Bogazzi
0297041e2f Fix iText space width justification (#2971) 2016-05-15 12:04:02 +02:00
Andrea Bogazzi
cb0c71e1fe * Remove rounding for minScaleLimit, added test.
* Remove rounding for minScaleLimit
2016-05-14 18:38:48 +02:00
Andrea Bogazzi
56ef2d2612 Update svg export to do not output colors in rgba format. 2016-05-09 12:41:48 +02:00
Andrea Bogazzi
a9cf96b9be fix imageToObject with resize filters (#2954)
width and height get stored as before filtering in case of filters with type resize.
2016-05-09 12:11:48 +02:00
Andrea Bogazzi
3ab5cdbc26 bring selectAll on keydown again (#2951) 2016-05-08 21:26:25 +02:00
Andrea Bogazzi
fcfc9f45f9 do not override user options. 2016-05-08 21:22:51 +02:00
Andrea Bogazzi
13026beecb Control customization part 4 - draw selection background (#2950) 2016-05-08 09:55:34 +02:00
Andrea Bogazzi
52f1ebd500 Update doc for _initDimension and setFont* methods (#2949)
* Update text.class.js doc
* added more docs
2016-05-07 09:04:46 +02:00
Andrea Bogazzi
b99eebd324 Control cusomization part 3 - allow for rounded corners (#2942)
Using Object.cornerStyle = 'circle' or 'rect'
2016-05-05 20:22:17 +02:00
Andrea Bogazzi
e5bedf3ebb fix itext width calculation with caching false (#2943) 2016-05-05 12:59:47 +02:00
Andrea Bogazzi
0410aae841 Control customization part 2 - Allow for separate corner filling and cornerStroke (#2933) 2016-05-04 22:44:30 +02:00
Andrea Bogazzi
27fd548bd3 Delegate dataURL multiplier to viewport zooming (#2940)
This temporary viewport change allow correct zooming and scaling of shadow.
2016-05-04 22:35:09 +02:00
Andrea Bogazzi
d7ea78b812 added prototype from basefilter 2016-05-04 20:59:32 +02:00
Andrea Bogazzi
c4911406ac Fix createSVGFontFacesMarkup (#2935)
* Update parser.js
2016-05-03 14:05:17 +02:00
Andrea Bogazzi
3c9fb411c4 Control customization part 1 - Set dashed line to controls and borders (#2932)
added:
cornerDashArray
borderDashArray
borderScaleFactor influences both border and controls now
changed default corner size to 13: (a default size of 12 is always out of focus when borders are on focus and viceversa, at least now they are same. difference is not noticeable because the 1st and 12th pixel where always across 2 different pixels)
2016-05-03 10:16:19 +02:00
Andrea Bogazzi
e032cae7d1 Set line dash in external function (#2928)
* move dashed code in function for later reuse in controls
* Added functionTest
2016-05-02 11:33:09 +02:00
Andrea Bogazzi
17775fa567 Make iText fires object:modified on text change on exit editing (#2927)
added some tests also.
2016-05-02 08:25:03 +02:00
Andrea Bogazzi
fab0c05d2a make Modifier keys customizable (#2925)
Make the keys used for modifying transformations and multiselect customizable within shiftKey, altKey and ctrlKey
2016-05-02 06:41:55 +02:00
Andrea Bogazzi
6fd1f8aa21 Add missing stroke.live translation, allow gradientTransform for dashed line. 2016-05-01 14:29:45 +02:00
Andrea Bogazzi
200632015f Allow hoverCursor to appear on non selectable objects. (#2924)
Fixed regression from #2907, added object.moveCursor
2016-05-01 03:06:20 +02:00
Andrea Bogazzi
015af249fa Update canvas loadFromJSON to restore includeProperties (#2921)
added test also.
2016-04-30 13:51:12 +02:00
Andrea Bogazzi
f88711a526 Docs links, remove last forward slash (#2917) 2016-04-28 23:33:40 +02:00
Andrea Bogazzi
b49882ba83 Stop producing fabric.Element documentation. (#2915)
fabric.Element is a deprecated alias.
2016-04-28 11:37:53 +02:00
Andrea Bogazzi
940db388a8 Use sendToBack, bringToFront, bringForward, sendBackwards for multiple selections (#2908)
Use sendToBack, bringToFront, bringForward, sendBackwards for activeGroups.
Visually there is no effect if preserveObjectStacking is set to false.
2016-04-28 11:21:48 +02:00
Andrea Bogazzi
c335cb558e remove forward slashes in docs urls 2016-04-27 16:02:58 +02:00
Andrea Bogazzi
611c6f7d4b remove forward slashes in docs urls 2016-04-27 16:01:48 +02:00
Andrea Bogazzi
21ea8c25c5 remove forward slashes in docs urls 2016-04-27 16:01:09 +02:00
Andrea Bogazzi
928009dce9 remove forward slashes in docs urls 2016-04-27 16:00:13 +02:00
Andrea Bogazzi
1768ef48ac deleted forward slashes in docs urls 2016-04-27 15:54:18 +02:00
Andrea Bogazzi
923b876e4b Fix docs ending slash for urls 2016-04-27 15:52:57 +02:00
Andrea Bogazzi
c84bce2703 Fire canvas mouse:out when the mouse leave the canvas (#2907)
* Add support for mouseOut out of the canvas.
Clear the _hoveredTarget and fire mouseout on the previous hovered if any.
Make selection of small object easier.
2016-04-26 02:05:58 +02:00
Andrea Bogazzi
218ad28f2b Draw controls only for active target (#2903) 2016-04-25 11:06:25 +02:00
Andrea Bogazzi
b95b4d2b2f Search the target again on mouse up 2016-04-25 10:32:23 +02:00
Andrea Bogazzi
32b963bc0c perPixelTargetFind shiftClick deselection fix
Make possible to shiftclick and remove object from active group while using perPixelTargetFind
2016-04-23 02:00:24 +02:00
Andrea Bogazzi
188fed21f5 Do not clear the contextTop if we are in drawingMode. closes #2723 (#2895)
* do not clear contexttop if we are drawing
2016-04-15 23:04:04 +02:00
Andrea Bogazzi
fd95729692 Safer event deleting (#2883)
made handler removal safer.
Add edge cases for event handler adding and deleting.
2016-04-14 00:05:46 +02:00
Andrea Bogazzi
37b20991c7 Allow a not stateful canvas to fire object:modified at end of transform. (#2890)
stateful false can fire events now
Also events fire just when the object is really rotated, scaled, skewed or dragged.
2016-04-13 23:39:35 +02:00
Andrea Bogazzi
de4826f968 Fix normalize function to handle 0/0 (#2888) 2016-04-13 03:07:33 +02:00
Andrea Bogazzi
a5192e487f Fix svg parsing/rendering regressions (#2887)
* fix regression in svg parsing
* Added tests to  catch regression

* Update parser.js

* Update parser.js
2016-04-13 01:44:15 +02:00
Andrea Bogazzi
5aa0ad1b8c remove warning of deprecated functions about imageSmoothingEnabled 2016-04-11 15:46:51 +02:00
Andrea Bogazzi
c6815892f3 Check presence of originalElement before taking src (#2878)
* check presence of originalElement before taking src

* add test for image with null element

* Update image.js

* Update image.js
2016-04-11 15:30:35 +02:00
Andrea Bogazzi
036bc9ab84 Various IText Fixes
Added keyup events, moved "CTRL + Key" combination on keyup so i cancel the event if the textarea consumes the event with other ( real copy and cut )
Added Ctrl+C for copy.
Added compositionUpdate event.
SetShadow was expecting some parameters, we add them at style declaration
Moving the textArea position when editing
managing japanese IME ( and maybe others )
Fixes property of object leaking on style objects
Fixes edge browser different behaviour with different selectionDirection
2016-04-10 14:48:04 +02:00
Andrea Bogazzi
2df1c1d37f Canvas dispose unwrap the lowercanvas element back to its original place
Added unwrap logic to canvas.dispose()
Added tests.
2016-04-09 16:02:42 +02:00
Andrea Bogazzi
a28651e761 Merge pull request #2820 from abruzzihraig/fix_IME_bug
fix(itext): fix bug that IME can not be inputted
2016-03-29 07:04:08 +02:00
Andrea Bogazzi
a4047d3043 Merge pull request #2858 from asturur/fix-text-bug2
fix bug introduced in 2f19e25ef2
2016-03-27 23:59:48 +02:00
Andrea Bogazzi
d1973113a2 fix bug introduced in 2f19e25ef2 2016-03-27 23:51:42 +02:00
Andrea Bogazzi
ad732f078d Proper fix for style detection 2016-03-27 23:44:43 +02:00
Andrea Bogazzi
719746e58d Revert "Textboxspaces" 2016-03-27 23:25:39 +02:00
Andrea Bogazzi
f1cd8bf5b6 Merge pull request #2853 from asturur/textboxspaces
Textboxspaces
2016-03-27 23:04:00 +02:00
Andrea Bogazzi
7059e34e9b Merge pull request #2854 from asturur/shadowflip
Flip back shadow if needed
2016-03-27 23:02:32 +02:00
Andrea Bogazzi
6891d2cde7 Update shadow.class.js 2016-03-26 13:41:34 +01:00
Andrea Bogazzi
e3e8984ec9 fixes trailing spaces 2016-03-26 13:00:37 +01:00
Andrea Bogazzi
0785bd9a32 check properly if there is style on the line 2016-03-26 12:47:20 +01:00
Andrea Bogazzi
55da566d37 Update textbox.class.js 2016-03-26 12:44:11 +01:00
Andrea Bogazzi
f5f51938f7 add check for this.styles[i] 2016-03-26 12:42:03 +01:00
Andrea Bogazzi
c1e3ad5b85 Merge pull request #2852 from asturur/textboxspaces
adding lineStarted logic to _wrapLine function
2016-03-26 11:52:34 +01:00
Andrea Bogazzi
2a1842af02 adding lineStarted logic to _wrapLine function
The error was considering line === '' as a line that just started. This messed up consecutive spaces.
Consecutive spaces create words with 0 lenght and they leave the line with no infix and no characters.
2016-03-26 11:41:49 +01:00
Andrea Bogazzi
c815f22d3e Merge pull request #2842 from asturur/bordersAddWithU
Do not draw control borders in normal group with active objects
2016-03-23 17:42:21 +01:00
Andrea Bogazzi
8410796872 drw controls and borders just if you are in active group ora active 2016-03-17 09:07:47 +01:00
Andrea Bogazzi
16f358cbfa Merge pull request #2827 from asturur/newtextshadow
Fix SVG for new text shadows
2016-03-11 18:57:06 +01:00
Andrea Bogazzi
a700376e82 improved docs 2016-03-11 11:09:12 +01:00
Andrea Bogazzi
fb69e9bc89 Do not call 2 times this.getSvgFilter() 2016-03-11 10:52:20 +01:00
Andrea Bogazzi
ab4721427e Merge pull request #2817 from asteriskman7/fix_offset_1x1_rect
Change location of rect in 1x1 case
2016-03-11 08:33:00 +01:00
Andrea Bogazzi
bb9aef9726 do not output useless empty style declaration 2016-03-11 08:28:20 +01:00
Andrea Bogazzi
cc9d826d4c add ability to skip shadow to style export
This is necessary for text now.
2016-03-11 06:16:42 +01:00
Andrea Bogazzi
a3fd9061ef Add shadow to outer group of text 2016-03-11 06:14:40 +01:00
Juriy Zaytsev
1324c73c2e Merge pull request #2806 from asturur/fix-retina-again
Fix retina scaling shadows and data url
2016-03-01 17:45:51 -05:00
Abruzzi
ecd5c15fe9 fix(lint): remove useless variable 'e' for lint 2016-03-01 20:45:27 +08:00
Abruzzi
e3e81195c9 fix(itext): fix bug that IME can not be inputted 2016-03-01 05:35:58 +08:00
asteriskman
47776c55fd Change location of rect in 1x1 case
As can be seen in this jsfiddle, https://jsfiddle.net/asteriskman/kk6v0tu4/ , the 1x1 rectangle was being placed incorrectly. It must be offset by -0.5 in the x and y direction to line up with other rects.
2016-02-26 22:51:56 -05:00
Andrea Bogazzi
91bf1fbacf Update object.class.js 2016-02-25 08:10:38 +01:00
Andrea Bogazzi
9c41f0923d Update itext.class.js 2016-02-25 02:59:04 +01:00
Andrea Bogazzi
2f19e25ef2 Update itext.class.js 2016-02-25 02:48:20 +01:00
Andrea Bogazzi
f15b7f5d3c Update text.class.js 2016-02-25 02:46:05 +01:00
Andrea Bogazzi
b4f99d96a9 Update canvas_dataurl_exporter.mixin.js 2016-02-25 00:52:51 +01:00
Andrea Bogazzi
bd345a39d5 Update object.class.js 2016-02-25 00:50:10 +01:00
Andrea Bogazzi
873abee422 fixes lint 2016-02-25 00:30:49 +01:00
Andrea Bogazzi
df1cffaade add retina scaling effect to dataUrl exporter
Add retina scaling as a normal dataurl multiplier.
Removed setWidth and setHeight in favor of setDimensions
Removed rescaling back of canvas because setDimension will clear the transform anyway.
2016-02-24 08:47:27 +01:00
Andrea Bogazzi
db068d59c9 enlarge shadow if retina scaling is active 2016-02-24 08:45:15 +01:00
Andrea Bogazzi
381f959f54 move retina logic check in a function 2016-02-24 08:44:21 +01:00
Juriy Zaytsev
053cbc3466 Merge pull request #2790 from mochidusk/pr_styleDecl_refactor
Use internal _getStyleDeclaration method for style declarations.
2016-02-19 12:30:32 -05:00
Juriy Zaytsev
3adaec2aae Merge pull request #2797 from asturur/svg-text-f
Add font faces to svg
2016-02-18 12:15:53 -05:00
Andrea Bogazzi
e8335054ee add some format to Itext svg export 2016-02-18 11:55:30 +01:00
Andrea Bogazzi
ac92abc3fb Add font face markup for styles and all text classes 2016-02-18 11:10:24 +01:00
Dusk Ho
38e7b5b98a Use internal _getStyleDeclaration method for style declarations. See #2780. 2016-02-13 04:20:07 +00:00
Andrea Bogazzi
fb42a34bcd Change canvasEl to work on browser and node. 2016-02-08 15:20:18 +01:00
Juriy Zaytsev
c79e872ea2 Merge pull request #2712 from asturur/transformMatrix
Restore green check on tests
2016-02-07 17:37:44 -05:00
Andrea Bogazzi
dfc574c099 Fix tests removing extra context.Restore(); 2016-02-07 18:23:14 +01:00
Juriy Zaytsev
20221a3243 Merge pull request #2770 from asturur/pass-image-to-callback
pass image/img to callback
2016-02-04 14:47:51 -05:00
Andrea Bogazzi
42da3a5689 pass image/img to constructor 2016-02-04 15:10:03 +01:00
Juriy Zaytsev
9dfa164c16 Merge pull request #2738 from asturur/svg-pars
Svg pars
2016-02-01 01:43:13 -05:00
Todd Christensen
0cdd9416b6 Fallback to styleElement.text for IE9.
IE9 doesn't provide a `textContent` property on this object.  This caused
errors when trying to import SVG files with `<style>` inside them.
2016-01-26 10:51:14 -08:00
Andrea Bogazzi
55a106ea58 add optional space between transform list 2016-01-17 16:13:46 +01:00
Juriy Zaytsev
3336c625a7 Merge pull request #2720 from asturur/rotatedgroup
shift click with generally transformed active groups
2016-01-04 14:52:27 -08:00
Andrea Bogazzi
6fd4082896 Merge pull request #12 from asturur/rotatedgroup
update _normalizePointer
2016-01-03 16:49:47 +01:00
Andrea Bogazzi
143e3ee66a update _normalizePointer 2015-12-30 16:24:02 +01:00
Juriy Zaytsev
09dd12bff3 Merge pull request #2719 from asturur/textflip
Textflip
2015-12-30 10:14:24 -05:00
Andrea Bogazzi
b8b8cadfff correct docs 2015-12-30 15:36:14 +01:00
Andrea Bogazzi
434f21b200 remove text flipping. 2015-12-30 15:35:31 +01:00
Juriy Zaytsev
7235f36856 Merge pull request #2627 from asturur/clean-polygon
Clean polygon class
2015-12-27 11:35:34 -05:00
Juriy Zaytsev
8ffa6a199d Merge pull request #2708 from asturur/dispos
Add active instance cleaning to dispose.
2015-12-27 11:34:22 -05:00
Andrea Bogazzi
60a63faa12 Update removewhite_filter.class.js 2015-12-27 00:29:39 +01:00
Andrea Bogazzi
957b5b3a76 Update canvas.class.js 2015-12-26 13:08:55 +01:00
Andrea Bogazzi
ecc72f8b63 Update static_canvas.class.js 2015-12-26 13:08:32 +01:00
Andrea Bogazzi
ae6b00f33d Update static_canvas.class.js 2015-12-24 17:19:40 +01:00
Juriy Zaytsev
5d0524a6bd Build dist, fix lint errors 2015-12-24 10:57:55 -05:00
Juriy Zaytsev
7fc9d307af Fix typo 2015-12-24 10:45:49 -05:00
Juriy Zaytsev
79278468a8 Merge pull request #2316 from mbrzuzy/master
IE9 bugfix for loading SVGs from URL that contain <text> nodes
2015-12-24 10:42:00 -05:00
Juriy Zaytsev
ae0aa7f981 Merge pull request #2689 from asturur/qrDecompone
use atan2 instead of atan and manual checks
2015-12-24 10:26:20 -05:00
Juriy Zaytsev
6f0cc79c47 Merge pull request #2703 from asturur/fill-opacity
Fill opacity and stroke opacity
2015-12-23 22:15:07 -05:00
Andrea Bogazzi
280746592c check for default color property if attribute is not present 2015-12-22 01:29:11 +01:00
Andrea Bogazzi
7b3da5008f use atan2 instead of atan and manual checks 2015-12-16 15:48:23 +01:00
Gábor Tóth
dfa5b4a103 fix for #2622 2015-12-15 15:50:00 +01:00
Andrea Bogazzi
bdb4f67f38 fixed error
of course i was testing with square image.
2015-12-13 03:11:04 +01:00
Juriy Zaytsev
0255ce9892 Merge pull request #2674 from asturur/justify-text-to-svg
Justify text to svg
2015-12-10 12:10:39 -05:00
Andrea Bogazzi
1f41cb3f13 Update text.class.js 2015-12-09 23:05:55 +01:00
Andrea Bogazzi
db0b026eef Update itext.class.js 2015-12-09 09:42:23 +01:00
Andrea Bogazzi
185d8e2d31 Update text.class.js 2015-12-09 09:41:37 +01:00
Andrea Bogazzi
a79177e05b Update shadow.class.js 2015-12-09 08:16:27 +01:00
Andrea Bogazzi
61daf81470 Update text.class.js 2015-12-08 19:53:44 +01:00
Andrea Bogazzi
411c8b446a Update shadow.class.js 2015-12-08 12:20:45 +01:00
Andrea Bogazzi
2dfc5b9fbd use NUM_FRACTION_DIGIT 2015-12-08 11:56:58 +01:00
Andrea Bogazzi
41a3aa8a4c Update text.class.js 2015-12-08 11:52:07 +01:00
Andrea Bogazzi
f7f64d9ea2 Update misc.js 2015-12-07 22:55:18 +01:00
Andrea Bogazzi
b037095d6b Update misc.js 2015-12-07 22:42:23 +01:00
Andrea Bogazzi
d9b7becb67 Update misc.js 2015-12-07 22:33:43 +01:00
Andrea Bogazzi
815b0acb20 Update shadow.class.js 2015-12-07 22:24:48 +01:00
Andrea Bogazzi
b93a46b353 Update misc.js 2015-12-07 22:19:37 +01:00
Juriy Zaytsev
35668b529b Merge pull request #2645 from rodovich/rotate-anchor
Fix importing paths with `rotate` transforms with anchor coordinates.
2015-12-03 10:37:02 -08:00
Juriy Zaytsev
c415792eca Merge pull request #2642 from asturur/svg-viewport
Svg viewport transform fixes
2015-12-02 15:18:31 -08:00
Juriy Zaytsev
6aeabcb10c Merge pull request #2656 from asturur/groupopacity
Group opacity not delegated
2015-11-30 14:33:12 -05:00
Andrea Bogazzi
1a0bceb079 check for object editability 2015-11-29 10:02:32 +01:00
Andrea Bogazzi
37fb2c1e2d Update group.class.js 2015-11-29 09:31:18 +01:00
Jim Rodovich
17c4962e19 Fix importing paths with rotate transforms with anchor coordinates. 2015-11-23 13:25:04 -06:00
Andrea Bogazzi
041e2747ab Update static_canvas.class.js 2015-11-23 16:49:25 +01:00
Andrea Bogazzi
6aa09fc567 fix grammar typo 2015-11-22 14:34:00 +01:00
Andrea Bogazzi
842af5d993 change svg header to use viewbox 2015-11-22 14:32:11 +01:00
Juriy Zaytsev
a25459ceab Merge pull request #2634 from asturur/convolutefilte
General code clean up for convolute filter
2015-11-18 08:14:02 -08:00
Andrea Bogazzi
fe7462cf46 General code clean up
we do not need to create a temporary canvas to call its createImageData, when normal canvas we are filtering can provide same method.
Removed 2 unused variables ( w and sw, h and sh where copies of each other and used in read only)
2015-11-18 14:23:52 +01:00
Juriy Zaytsev
540ecc6a39 Merge pull request #2632 from asturur/fixcontrols
Fixcontrols
2015-11-17 19:24:28 -08:00
Andrea Bogazzi
cc8ed6bac8 Update canvas.class.js 2015-11-17 21:29:39 +01:00
Andrea Bogazzi
cd9ae6e9a3 Update static_canvas.class.js 2015-11-17 21:28:50 +01:00
Andrea Bogazzi
1c9932f97f Update polygon.class.js 2015-11-16 11:25:27 +01:00
Andrea Bogazzi
345c403a8e Update polygon.class.js 2015-11-16 01:26:54 +01:00
Juriy Zaytsev
ae1ee007a3 Merge pull request #2568 from asturur/fix-shadow
Update shadow.class.js
2015-11-13 11:04:51 +01:00
Juriy Zaytsev
7cb4f17833 Merge pull request #2625 from asturur/multitouch
Fix multi touch scaling speed
2015-11-13 11:03:28 +01:00
Juriy Zaytsev
8f80fe632a Merge pull request #2623 from asturur/retina-on-scale
reinit retina scaling on canvas element dimensions change
2015-11-13 09:33:06 +01:00
Juriy Zaytsev
ad12e534a8 Merge pull request #2624 from asturur/image-border-0
change default strokewidth to 0  for images
2015-11-13 09:32:48 +01:00
Andrea Bogazzi
d16ef6b124 Update canvas_gestures.mixin.js
we need to use transformed dimensions to include effect of skew. but we need to divide by current scale and use just the initial scale plus the scaling factor of gesture.
2015-11-13 01:44:07 +01:00
Andrea Bogazzi
d96c94dc4f change default strokewidth to 0 2015-11-13 00:27:39 +01:00
Andrea Bogazzi
6317d95254 Update static_canvas.class.js 2015-11-13 00:22:45 +01:00
Andrea Bogazzi
931ef7d58f Add missing parameter to _ScaleObjectBy 2015-11-02 11:09:42 +01:00
Juriy Zaytsev
86bb0c773d Merge pull request #2580 from asturur/retina-scaling
fix bug with retina scaling
2015-10-24 17:46:37 +02:00
Juriy Zaytsev
faf18bfba1 Merge pull request #2549 from asturur/fix-group-transform
[WIP] Handle group transformation with skew and rotate + scale
2015-10-24 17:46:16 +02:00
Andrea Bogazzi
41d247d700 Update static_canvas.class.js 2015-10-24 16:16:34 +02:00
Andrea Bogazzi
e1b165b983 switch to save and restore methods 2015-10-24 16:04:53 +02:00
Andrea Bogazzi
45150e39c1 Update group.class.js 2015-10-24 15:41:37 +02:00
Andrea Bogazzi
701a62053d make group transform support general transforms 2015-10-24 15:38:46 +02:00
Andrea Bogazzi
0836408035 remove duplicate logic 2015-10-21 12:58:59 +02:00
Andrea Bogazzi
026388d93c Add missin coma 2015-10-21 11:38:20 +02:00
Andrea Bogazzi
d4bae8230d Update shadow.class.js
add affectStroke to toObject
2015-10-21 11:10:34 +02:00
Andrea Bogazzi
753e67bce2 Reset viewport transform at the end of render all 2015-10-16 10:19:03 +02:00
asturur
ff79ab1aca first changes to group transform handling 2015-10-14 08:48:03 +02:00
Andrea Bogazzi
07234dfdf6 Update canvas.class.js 2015-10-13 00:29:26 +02:00
DanieleSassoli
f3268cf855 bugfix, sometimes the mask was stretched. 2015-10-08 15:17:24 +02:00
DanieleSassoli
e2a56bb254 Fixed bug that caused image to be corrupted when a mask was applyed only if the image was bigger the mask. 2015-10-07 16:52:45 +02:00
Juriy Zaytsev
b4a2bf694e Merge pull request #2502 from asturur/fix-ite
Fix itext onInput with selected text
2015-10-05 10:22:02 -04:00
Juriy Zaytsev
9549631cfa Merge pull request #2503 from asturur/obj.selectab
Fix object selectable with shift click and itext mouse cursor click.
2015-09-29 09:57:44 -04:00
Juriy Zaytsev
33cdaa1289 Merge pull request #2491 from asturur/fix-object.toDataURL
Update canvas_dataurl_exporter.mixin.js
2015-09-27 12:02:53 -04:00
Andrea Bogazzi
6426a02758 Update canvas_grouping.mixin.js 2015-09-27 17:50:57 +02:00
Andrea Bogazzi
26cf009c98 Update canvas.class.js 2015-09-27 17:44:25 +02:00
Andrea Bogazzi
b020b243e9 removed some duplicate code 2015-09-27 17:00:16 +02:00
Andrea Bogazzi
49b876a704 Update textbox_behavior.mixin.js 2015-09-27 16:58:15 +02:00
Andrea Bogazzi
c943d369a2 Update itext_key_behavior.mixin.js
Remove cancelOnInput logic, a normal e.preventDefault + stopPropagation is enough.
Take in account already selected text when deciding how much text we are inserting during input event
2015-09-27 16:37:32 +02:00
Andrea Bogazzi
520e8e6179 Update canvas_dataurl_exporter.mixin.js 2015-09-23 00:23:21 +02:00
Juriy Zaytsev
6886d377b7 Merge pull request #2487 from asturur/fix-object.toDataURL
Fix object.to data url
2015-09-19 18:52:31 -04:00
Andrea Bogazzi
69d0071536 move toDataURL to lower canvas, if it has to work on staticCanvas. 2015-09-20 00:44:31 +02:00
Andrea Bogazzi
bbae1aa9f6 Add gradient transform to toObject method 2015-09-19 08:25:17 +02:00
KULDIP PIPALIYA
66e4efb847 added textAlign possible value in doc block
https://github.com/kangax/fabricjs.com/pull/96
2015-09-18 00:31:39 +05:30
Juriy Zaytsev
4a6001e356 Merge pull request #2479 from nibynool/bugfix/GestureOriginChange
After rendering a gesture set the origin back to its initial value
2015-09-17 12:52:01 -04:00
Juriy Zaytsev
6d99aafd60 Merge pull request #2482 from asturur/skew2
Add global support for skewing
2015-09-17 12:46:11 -04:00
Andrea Bogazzi
960a763d75 fix wrong english 2015-09-17 18:41:28 +02:00
Juriy Zaytsev
f92f56c27a Merge pull request #2400 from asturur/delete-double-rendering-on-renderTop
Delete double rendering on rendertop
2015-09-17 12:17:58 -04:00
Andrea Bogazzi
07fce195ce Add missing function the extended object 2015-09-17 14:35:41 +02:00
Andrea Bogazzi
cda0611326 Add support for skew objects. 2015-09-17 14:22:12 +02:00
Juriy Zaytsev
7f713d2092 Merge pull request #2462 from bedeoverend/master
Check for host in getScrollLeftTop
2015-09-16 08:14:44 -04:00
Bede
4e21a4ace3 Add explanation as to .host check 2015-09-16 16:41:33 +10:00
Michael Lambert
8d561eaf52 After rendering a gesture set the origin back to its initial value 2015-09-16 09:47:13 +10:00
Juriy Zaytsev
941f97d606 Merge pull request #2466 from asturur/fix-checkTarget
check for obj.selectable
2015-09-02 21:57:21 -04:00
Andrea Bogazzi
48529ff2ae check for obj.selectable 2015-09-02 21:52:22 +02:00
Bede
f9d904a9c7 Check for host in getScrollLeftTop 2015-09-02 10:59:22 +10:00
Andrea Bogazzi
7d4aa20435 Update itext.class.js 2015-08-30 16:36:13 +02:00
Andrea Bogazzi
3cb426454e Merge pull request #34 from kangax/master
update to master
2015-08-30 16:34:53 +02:00
Andrea Bogazzi
9362acc9d3 correct value of e.button
as per https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
2015-08-30 16:09:01 +02:00
Juriy Zaytsev
9fbb246e66 Merge pull request #2406 from asturur/bug-in-getElement-polyfill
Bug in getElementById polyfill
2015-08-21 17:23:24 -04:00
Juriy Zaytsev
0ff9198010 Merge pull request #2434 from asturur/bugfix
Bugfix
2015-08-21 14:03:38 -04:00
Andrea Bogazzi
66e87bb728 Update itext.class.js 2015-08-21 16:17:55 +02:00
Andrea Bogazzi
848471fd02 Update itext.class.js 2015-08-21 16:09:01 +02:00
Andrea Bogazzi
3520a51d21 Fix getElementByID polyfill and added failing test for it 2015-08-21 14:44:23 +02:00
Andrea Bogazzi
66f492f50b Update textbox.class.js 2015-08-21 11:42:14 +02:00
Juriy Zaytsev
bf420d4a15 Merge pull request #2423 from asturur/textbox-optimization
Textbox optimization on wraptext
2015-08-20 13:04:12 -04:00
Andrea Bogazzi
dc24c48d81 Update textbox.class.js 2015-08-20 17:04:05 +02:00
Andrea Bogazzi
2a53b69e5b Update itext.class.js 2015-08-20 16:04:12 +02:00
Andrea Bogazzi
19da6a7968 Update itext_behavior.mixin.js 2015-08-20 16:02:44 +02:00
Andrea Bogazzi
68360b81a3 Update textbox.class.js 2015-08-20 15:55:44 +02:00
Andrea Bogazzi
d6da75a1f1 Update textbox.class.js 2015-08-20 15:16:35 +02:00
Andrea Bogazzi
c8bfd7f5de Add short circuit for block char insertion 2015-08-18 13:19:55 +02:00
Andrea Bogazzi
1bbc356393 Optimize use of cache, use standard method to retrieve char width 2015-08-18 12:38:36 +02:00
Andrea Bogazzi
ed3b701712 Removed some itext duplicated code 2015-08-17 17:21:08 +02:00
Andrea Bogazzi
8b491480b4 Optimize _wrapText's use of _measureText 2015-08-17 15:37:42 +02:00
Juriy Zaytsev
db343783d4 Merge pull request #2407 from asturur/deep-clo
Deep clone transformMatrix, strokeDashArray and styles properties
2015-08-13 16:34:08 -04:00
Andrea Bogazzi
8ff217c59a Update object.class.js 2015-08-13 22:28:06 +02:00
Andrea Bogazzi
37acc8a602 Set offset to 0 if attribute not present 2015-08-12 14:18:50 +02:00
Andrea Bogazzi
dae413f745 Update itext.class.js 2015-08-12 07:09:05 +02:00
Andrea Bogazzi
5966b5e319 toObject returns deep cloning if necessary 2015-08-11 11:10:51 +02:00
Andrea Bogazzi
ba8e97dd33 Update object.class.js 2015-08-10 15:45:14 +02:00
Juriy Zaytsev
821c29a2da Merge pull request #2401 from asturur/fix-gradient-creation
Fix gradient creation
2015-08-09 20:28:19 -04:00
Andrea Bogazzi
3c132945c2 Update object.class.js 2015-08-10 01:54:17 +02:00
Juriy Zaytsev
7c81f464b8 Merge pull request #2399 from asturur/parse-x-y-svg-atttrs
Parse x y svg attributes
2015-08-09 19:29:59 -04:00
Andrea Bogazzi
66bf218885 Update object.class.js 2015-08-10 01:29:57 +02:00
Andrea Bogazzi
cf19c6f6cc Update parser.js 2015-08-10 01:21:56 +02:00
Andrea Bogazzi
e612d4c495 Update static_canvas.class.js 2015-08-10 00:48:28 +02:00
Juriy Zaytsev
d742cc6ea6 Merge pull request #2393 from asturur/fix-text-enter-edit-on-corner
Fix text enter edit on corner
2015-08-09 17:30:20 -04:00
Juriy Zaytsev
7c6bdd9be5 Merge pull request #2395 from asturur/fix-itext-paste
Fix itext paste performance
2015-08-09 15:49:44 -04:00
Juriy Zaytsev
0715f15f28 Merge pull request #2364 from asturur/fix-svgBaseMarkup
Fix svg base markup
2015-08-09 15:49:09 -04:00
Andrea Bogazzi
0edd147b0e Update group.class.js 2015-08-08 14:30:24 +02:00
Andrea Bogazzi
0a550efcd3 Update itext_behavior.mixin.js 2015-08-08 10:49:28 +02:00
Andrea Bogazzi
94ab565da9 Update object_interactivity.mixin.js 2015-08-07 11:09:11 +02:00
Andrea Bogazzi
1dc1271495 Update itext_click_behavior.mixin.js 2015-08-07 11:05:17 +02:00
Juriy Zaytsev
fe087a0ceb Merge pull request #2389 from asturur/fix-double-measu
Removed unnecessary call to ctx.measureText
2015-08-06 10:37:11 -04:00
Andrea Bogazzi
36554dbcaa Update itext.class.js 2015-08-06 09:23:26 +02:00
Juriy Zaytsev
5dcedda455 Build dist, update packages 2015-08-04 19:31:27 -04:00
Juriy Zaytsev
44eb376fc8 Merge pull request #2370 from asturur/fix-textboxcursor
Remove duplicate code and fix justify style issue
2015-07-31 13:28:48 -04:00
Andrea Bogazzi
27b5d2b0fd Update textbox.class.js 2015-07-29 13:04:25 +02:00
Juriy Zaytsev
f1e59c0d14 Merge pull request #2368 from asturur/fix-textboxcursor
Fix text itext code
2015-07-29 01:34:27 -04:00
Andrea Bogazzi
2518a486c3 Update textbox.class.js 2015-07-28 19:20:14 +02:00
Andrea Bogazzi
29f601512b Update text.class.js
Removed direct use of __lineWidths
2015-07-28 19:05:21 +02:00
Andrea Bogazzi
43500f77f4 Update object_geometry.mixin.js 2015-07-24 10:12:45 +02:00
Juriy Zaytsev
3b99fc11ff Merge pull request #2353 from asturur/simpler-setCoords
Simpler setCoords
2015-07-22 08:59:28 -04:00
Juriy Zaytsev
2cedb1cc90 Merge pull request #2354 from asturur/fix-text-glitche
Fix text glitche
2015-07-22 08:40:25 -04:00
Andrea Bogazzi
22d9f8d62a Update text.class.js 2015-07-22 11:01:45 +02:00
Andrea Bogazzi
76284b27cd Update text.class.js
draft
2015-07-22 10:57:16 +02:00
Andrea Bogazzi
a9c054d58b Update object_interactivity.mixin.js 2015-07-21 17:48:27 +02:00
Andrea Bogazzi
538d4eed50 Update object_geometry.mixin.js 2015-07-21 17:47:14 +02:00
Andrea Bogazzi
4b387b744f Update itext_key_behavior.mixin.js 2015-07-21 17:14:33 +02:00
Andrea Bogazzi
c545075122 Update itext_key_behavior.mixin.js 2015-07-21 14:35:41 +02:00
Andrea Bogazzi
520324d261 Update object_geometry.mixin.js 2015-07-21 14:34:34 +02:00
Juriy Zaytsev
3907853048 Update textbox documenation 2015-07-20 13:56:26 -04:00
Juriy Zaytsev
20e97924f4 Make sure image props are output properly 2015-07-20 13:56:20 -04:00
Juriy Zaytsev
614878d133 Merge pull request #2350 from asturur/exportTransformMa
export Transfor Matrix in toObject
2015-07-20 11:45:08 -04:00
Juriy Zaytsev
aba1b0e8f8 Merge pull request #2347 from asturur/fixes-textbox
Some fixes to textbox
2015-07-20 11:11:59 -04:00
Andrea Bogazzi
215ed8b9b8 Merge pull request #24 from kangax/master
asd
2015-07-20 01:23:17 +02:00
Andrea Bogazzi
8573c755b6 Update object.class.js 2015-07-18 00:50:56 +02:00
Juriy Zaytsev
2171dd1379 Output less irrelevant information in fabric.Image#toObject 2015-07-17 17:42:30 -04:00
Juriy Zaytsev
1499d34b1e Merge pull request #2348 from asturur/fix-pathgroup-parsing
Fix parsing pathgroup dimensions from inner paths
2015-07-17 11:31:42 -04:00
Andrea Bogazzi
21d9ddf9e4 Update path_group.class.js 2015-07-17 17:27:28 +02:00
Juriy Zaytsev
f45291cf42 Merge pull request #2345 from asturur/restore-parser
Restore parsing svg elements as a parent in caso of use tag plus svg tag
2015-07-17 10:43:31 -04:00
Juriy Zaytsev
4c915f17c6 Merge pull request #2349 from asturur/shadowcolor-su
add support for shadow colors in svg
2015-07-17 10:35:24 -04:00
Andrea Bogazzi
8f14daaba8 Update textbox.class.js 2015-07-17 14:17:53 +02:00
Andrea Bogazzi
e41088329d Update shadow.class.js 2015-07-17 14:13:21 +02:00
Andrea Bogazzi
f519bd422a Update parser.js 2015-07-17 11:36:41 +02:00
Andrea Bogazzi
d9d8c715fd Update parser.js 2015-07-17 09:48:46 +02:00
Juriy Zaytsev
5fe5db377b Merge pull request #2340 from asturur/fix-itextcopypaste
Fix itextcopypaste
2015-07-15 13:31:04 -04:00
Andrea Bogazzi
5be39487e9 Update itext_key_behavior.mixin.js 2015-07-15 19:03:43 +02:00
Juriy Zaytsev
73eb7a6ac8 Merge pull request #2342 from asturur/fix-shiftclick-activegroup
Fix shiftclick activegroup
2015-07-15 12:41:52 -04:00
Andrea Bogazzi
d36945f6e2 Update path.class.js 2015-07-15 16:50:25 +02:00
Andrea Bogazzi
a1b853e1d7 Update canvas.class.js 2015-07-15 15:08:54 +02:00
Juriy Zaytsev
18e87d9d59 Merge pull request #2337 from asturur/master
fix imageSmoothing glitches
2015-07-14 11:00:29 -04:00
Andrea Bogazzi
1e7616009d fix imageSmoothing glitches 2015-07-14 16:51:43 +02:00
Juriy Zaytsev
ed3264a72e Merge pull request #2335 from asturur/fix-pattern-toObject
Fix pattern to object
2015-07-14 10:29:11 -04:00
Juriy Zaytsev
033402d06d Merge pull request #2336 from asturur/itext-paste
Itext paste
2015-07-14 10:27:37 -04:00
Andrea Bogazzi
8f547d91c1 Update itext_key_behavior.mixin.js 2015-07-14 13:09:13 +02:00
Andrea Bogazzi
fbd3f174b5 Update pattern.class.js 2015-07-14 12:23:23 +02:00
Juriy Zaytsev
8791741c9f Merge pull request #2237 from inssein/textbox
Textbox Implementation - from Jaffer Haider
2015-07-13 18:34:58 -04:00
Juriy Zaytsev
c7c9d24ebb Fix linter 2015-07-10 16:04:34 -04:00
Juriy Zaytsev
713c19335a Merge pull request #2328 from ChrisBuergi/animate-color
Added simple color animation utility.
2015-07-10 15:49:48 -04:00
Juriy Zaytsev
fb22168f48 Add support for hidpi rendering on retina screens
Closes #316
2015-07-10 11:13:51 -04:00
mbrzuzy
5ddcce5687 Fix errors made when porting over IE9 Fix
- When fix was added, I was still referencing element.textContent instead of the modified textContent
2015-07-08 16:19:04 -04:00
Chris Buergi
971166978c Added simple color animation utility. 2015-07-08 15:04:16 +02:00
Juriy Zaytsev
65c29807b6 Merge pull request #2310 from asturur/fix-text-opacity
Fix text opacity
2015-07-03 12:50:10 -04:00
mbrzuzy
1ecebe38ee IE9 bugfix for loading SVGs from URL that contain <text> nodes 2015-07-01 09:04:25 -04:00
Andrea Bogazzi
2315fafde1 Update parser.js 2015-06-26 12:07:03 +02:00
Andrea Bogazzi
23eff30d1b Update text.class.js 2015-06-26 11:47:04 +02:00
inssein
e7b01abf73 fix CS 2015-06-18 20:06:32 -07:00
inssein
3902442ebf finally installed jscs and ran it to fix all errors 2015-06-16 13:54:03 -07:00
inssein
5daab00d69 fix off by one errors when calculating the offset 2015-06-16 13:19:41 -07:00
inssein
5824a48268 bringing over fixes from application textbox 2015-06-16 10:34:08 -07:00
Juriy Zaytsev
ebd2135b08 Merge pull request #2278 from sapics/fix-undefined-function
fix undefined function call
2015-06-16 13:01:07 -04:00
Hussein Jafferjee
deecc9df4c fix callSuper()'s inside mixins 2015-06-15 14:04:42 -07:00
Hussein Jafferjee
43668e3571 Fix cursor location to include spaces that are removed 2015-06-15 14:01:57 -07:00
Hussein Jafferjee
4c17f358e5 Properly detect where a click happens inside a textbox 2015-06-15 13:57:40 -07:00
Hussein Jafferjee
1db7e953c2 Fix bug in stylemap generation 2015-06-15 13:55:12 -07:00
Hussein Jafferjee
ea81c0f1e9 Account for removed space's at end of line when wrapping 2015-06-12 10:26:36 -07:00
Hussein Jafferjee
c158e311df Update textbox.class.js
Overlooked simple case - do not add word that is too long onto a line that already contains text.
2015-06-12 09:26:21 -07:00
sapics
f5b4605032 remove unused variables 2015-06-12 13:40:39 +09:00
inssein
26bba123af dont wrap when its smaller than a single word. 2015-06-11 20:00:23 -07:00
Juriy Zaytsev
74d05ed8f3 Merge pull request #2274 from asturur/clean-origins
forgot some cleaning
2015-06-11 22:07:06 -04:00
inssein
079a6f4e30 fix styles when measuring 2015-06-11 10:55:18 -07:00
inssein
7b581b4753 CS 2015-06-11 10:25:43 -07:00
inssein
0cf09986ee fix insertCharStyleObject so that it deletes properly 2015-06-11 10:21:37 -07:00
Juriy Zaytsev
2d2712c784 Merge pull request #2128 from asturur/pointer-in-scrollable
fix getScrollLeftTop
2015-06-11 10:46:54 -04:00
inssein
ce1023e709 whoops 2015-06-11 00:01:37 -07:00
Andrea Bogazzi
47dbb2303b Update object_origin.mixin.js 2015-06-11 08:19:08 +02:00
sapics
f556ab9411 function name fix 2015-06-11 13:45:01 +09:00
sapics
7e9f17186f just code simpler 2015-06-11 11:16:41 +09:00
inssein
9eb597c729 Use this.styles as if it's not affected by line-wraps. 2015-06-10 17:12:54 -07:00
Andrea Bogazzi
6ca7a5969c Update object_origin.mixin.js 2015-06-10 18:05:24 +02:00
Juriy Zaytsev
0d83da0e29 Merge pull request #2269 from asturur/fix-rotated-poi
Fix rotated pointer
2015-06-10 11:59:22 -04:00
Juriy Zaytsev
2d38f9eb22 Merge pull request #2257 from asturur/clean-origins
Clean origins
2015-06-09 01:30:00 -04:00
Andrea Bogazzi
a745e41849 Added rotation logic to getLocalPointer, removed no more usefull getLocalRotatedPointer 2015-06-08 07:59:07 +02:00
Andrea Bogazzi
b22ae4f37a Update object_origin.mixin.js 2015-06-08 00:32:03 +02:00
Andrea Bogazzi
6cc36ccdff Update object_origin.mixin.js 2015-06-07 10:04:00 +02:00
inssein
4843a61a84 need to figure out how to get phpstorm to auto format these mistakes 2015-06-03 17:07:42 -07:00
inssein
4987b55ed6 formatted 2015-06-03 16:49:38 -07:00
inssein
bf7f2ea731 1) adjust index when clicking on end of line
2) measure text in a line properly
2015-06-03 16:39:10 -07:00
inssein
2b3c75b6b1 fix selection and up + down movements 2015-06-03 11:31:02 -07:00
Juriy Zaytsev
d817ae6f63 Merge pull request #2256 from asturur/fix-style-parsing
Fix style parsing
2015-06-03 14:13:38 -04:00
sapics
e07350c9e7 fix group initialization 2015-06-03 08:45:19 +09:00
Andrea Bogazzi
3b460d9034 Fix fore removing last ; followed by spaces 2015-06-02 22:31:54 +02:00
inssein
d08dabc2ab forgot setOnGroup additions 2015-05-31 22:45:33 -07:00
inssein
3e57b2a835 changes requested by kangax 2015-05-31 15:44:44 -07:00
inssein
a641dbf8f9 silly formatting rules :P 2015-05-28 22:41:23 -07:00
inssein
b9aa3500a2 formatting 2015-05-27 21:30:17 -07:00
inssein
8934b93bc7 Change the get2DCursorLocation() function to return appropriately. Added additional comments for clarity. 2015-05-27 20:24:06 -07:00
inssein
5991fb085b use _splitTextIntoLines() everywhere 2015-05-27 20:16:26 -07:00
inssein
b7275de184 adhere to 120 character limit 2015-05-27 15:30:40 -07:00
inssein
30a95ae1e4 forgot to set proper style guide when auto-formatting 2015-05-27 15:30:40 -07:00
inssein
4cb3923279 typo.. 2015-05-27 15:30:40 -07:00
inssein
1718c266bd missed main textbox class, and autoformatted changes. 2015-05-27 15:30:40 -07:00
inssein
489eb1bddf Textbox implementaion from Jaffer Haider, with one minor change in textbox_key_behavior 2015-05-27 15:30:40 -07:00
inssein
502259a946 Fix bug with image.class.js not properly calling _initConfig when initializing. 2015-05-27 13:47:06 -07:00