Commit Graph

1854 Commits

Author SHA1 Message Date
Anton Lavrenov
33d64e194c build fixes, text underline fixes 2019-02-06 12:46:21 -05:00
Anton Lavrenov
08b3fb159e update deps 2019-02-06 12:03:53 -05:00
Anton Lavrenov
0f4681e9be remove some content events usage 2019-02-05 21:32:29 -05:00
Anton Lavrenov
9aed313ef2 better test 2019-02-05 21:21:57 -05:00
Anton Lavrenov
052d090ea3 Merge branch 'master' of github.com:konvajs/konva 2019-02-05 16:43:57 -05:00
Anton Lavrenov
b02ac65e68 fix docs, Better implementation of mouseover event for stage 2019-02-05 16:43:43 -05:00
VladimirTechMan
15e7477e81 When removing a child, set key "parent" to null, don't delete it
Structural changes to objects are relatively more expensive and
harder to optimize for modern JavaScript compilers, compared to
just changing object's key values. The parent property of nodes
is already set to null now, as part constructing the object.
Setting it back to null on removal / destroy of objects is more
consistent and a tiny little bit more efficient.
2019-02-03 22:47:50 +03:00
VladimirTechMan
09bfaab9f2 Fix for the performance regression in the updated batchDraw()
The code was checking the "waiting" flags, but they were not set.
This patch corrects that part and makes a few other tweaks to the
updated logic on top of requestAnimationFrame().
2019-02-03 14:21:41 +03:00
Anton Lavrenov
31785f6323 Show a warning for incorrect value for component setters. Fix some TODOs 2019-01-27 15:43:50 -05:00
Anton Lavrenov
a0b2f027ba drag&drop refactor, update docs 2019-01-25 00:20:15 -05:00
Anton Lavrenov
11d805795a warning on dublicate ids 2019-01-24 22:52:16 -05:00
Anton Lavrenov
d726c5d6f3 add docs, change perf test 2019-01-24 08:45:17 -05:00
Anton Lavrenov
a81f9ec1f9 Show a warning when a stage has too many layers 2019-01-22 08:43:43 -05:00
Anton Lavrenov
41a46c8afe clean up some methods 2019-01-21 21:22:36 -05:00
Anton Lavrenov
3a89a7a0c1 Merge branch 'master' of github.com:konvajs/konva 2019-01-21 19:30:54 -05:00
Anton Lavrenov
0057841032 Merge branch 'master' of github.com:konvajs/konva 2019-01-21 19:29:57 -05:00
Anton Lavrenov
7aa3c3238d several fixes 2019-01-21 17:42:02 -05:00
VladimirTechMan
d823beefb0 Simpler code logic for Node._isVisible()
The original logic can be implemented in a more compact and clear
way while producing the same results.
2019-01-21 23:50:07 +03:00
Anton Lavrenov
199bbbbff1 some fixes 2019-01-20 18:06:46 -05:00
VladimirTechMan
0be8e779bc Fix the calls to getGlobalKonva() inside the current code base
Following the recent migration to TypeScript, getGlobalKonva()
returns undefined (as glob.Konva was not set) when using konva.js
or konva.min.js inside a web application running in a browser.
This change works around the situation by explicitly setting the
Konva property on the glob object.
2019-01-20 12:12:12 +03:00
Anton Lavrenov
d960cf5c67 Merge pull request #546 from VladimirTechMan/master
Fix handling of the width and hight changes in the Stage class
2019-01-19 21:31:51 -05:00
Anton Lavrenov
521070cb05 fix watch mode 2019-01-19 21:29:52 -05:00
VladimirTechMan
eb73c96a3a Fix handling of the width and hight changes in the Stage class
Just resize the DOM elements, don't replace the current contents
with a new (empty) one.
2019-01-19 23:52:34 +03:00
Anton Lavrenov
a5d6e93c31 Merge branch 'master' of github.com:konvajs/konva 2019-01-19 10:13:43 -05:00
Anton Lavrenov
5c4df70738 update docs 2019-01-19 10:13:21 -05:00
VladimirTechMan
e6276d28db Minor improvement to the implementation of Text._sceneFunc
As the context's translate() is additive, there is no need for
the two consecutive calls of it inside _sceneFunc(): The same
effect can be achieved with with just one call of translate().

A corresponding update was done in the unit test for Text that
had a pair of calls to translate() in the expected call dump.
2019-01-19 14:56:38 +03:00
VladimirTechMan
30d304556f Very minor optimization to _getCache()
This is just a minor change to avoid accessing the same property
in object this._cache twice inside _getCache() when its is already
set (defined). No big performance improvements probably, but given
that the cached values can be checked many times for each node
in the tree, I think it makes sense to do that small improvement.
2019-01-16 19:42:41 +03:00
Anton Lavrenov
b9942e5b62 Merge branch 'master' of github.com:konvajs/konva 2019-01-15 14:55:50 -05:00
VladimirTechMan
1a62681e58 When rendering multi-line texts, check text decoration flags once
A small improvement to avoid re-testing the presence of underline
and line-through attributes in the textDecoration property on each
line of the text being rendered.
2019-01-15 21:39:40 +03:00
Anton Lavrenov
d90b0f15c2 Merge branch 'master' of github.com:konvajs/konva 2019-01-14 13:29:36 -05:00
Anton Lavrenov
5ebef8ef6e some code and comments fixes 2019-01-14 13:29:24 -05:00
VladimirTechMan
d5523bb11b Simplify the Boolean condition used in _useBufferCanvas()
The original Boolean condition duplicates most of the predicates
used in both parts of the "or" expression. It is enough to test
them just once, which also makes it easier to figure out what
the criterion for using the buffer canvas is. (An extra effect
is that the code becomes smaller and potentially quicker for the
JIT compiler to handle, but I don't expect much reduction here.)
2019-01-12 21:49:21 +03:00
VladimirTechMan
70ff42d017 Spelling correction to variable name 2019-01-11 21:46:44 +03:00
Anton Lavrenov
60e425c596 Merge branch 'master' of github.com:konvajs/konva 2019-01-11 08:52:28 -05:00
Anton Lavrenov
830eb53650 bugs fixes, docs updates. fix #535 2019-01-11 08:51:46 -05:00
VladimirTechMan
6c53a2b27a Do not recalculate additionalWidth on every line of multiline text
This is just a minor improvement (optimization) to _setTextData():
Flag shouldAddEllipsis is not changed inside the loop, thus no need
to recalculate the value of additionalWidth for every line of the
original text.
2019-01-08 20:03:25 +03:00
VladimirTechMan
4be6ed7ac8 Setting text on Konva.Text, treat undefined width or height as 'auto'
Similar to how it's handled in getWidth() and getHeight() of Konva.Text,
let _setTextData() treat undefined values of the 'width' and 'height'
attributes as if they are set to 'auto', not as if they are fixed.
2019-01-06 22:06:37 +03:00
Anton Lavrenov
52f2b8178b docs updatesx 2019-01-06 03:01:20 -05:00
Anton Lavrenov
4d58cd6479 initial migrate to typescript 2019-01-01 15:59:27 -05:00
Anton Lavrenov
1cbabcb06d add back ie fix 2018-12-18 12:29:48 -05:00
Anton Lavrenov
d00a5b4a6d remove all old fixes 2018-12-18 12:24:01 -05:00
Technik Radio F.R.E.I
5bbb42d8fb fix mouse events on mobile devices
- remove check for mobile flag in mouse event handlers
- remove workaround fake mousemove event in chrome browser https://code.google.com/p/chromium/issues/detail?id=161464 because it prevents mouse events working on Android mobile devices
2018-12-16 00:03:03 +01:00
Anton Lavrenov
2404368ec8 New ignoreStroke for Konva.Transformer, perf fixes 2018-12-14 13:28:39 -05:00
Anton Lavrenov
d76b09e026 update docs, update version 2018-11-27 09:02:28 -05:00
Anton Lavrenov
352f493d0a getKerning TextPath API is deprecated. Use "kerningFunc" instead. 2018-11-17 08:50:31 -05:00
Anton Lavrenov
8327371bd6 update CHANGELOG with new version 2018-11-08 09:15:47 -05:00
Anton Lavrenov
b085ece741 Use custom functions for trimRight and trimLeft (for better browsers support) 2018-11-08 09:12:51 -05:00
Anton Lavrenov
5136e29d6a Fix transformer behaviour on shapes with shadow. fix #481 2018-10-22 12:16:30 -05:00
Anton Lavrenov
2ccc9a7fdd remove logs, update perf test 2018-10-18 15:12:54 -05:00
Anton Lavrenov
f645b22c4a * `dragstart event behaviour is a bit changed. It will fire BEFORE actual position of a node is changed. fix #476 2018-10-18 12:28:03 -05:00