text shadow test

This commit is contained in:
Anton Lavrenov
2016-10-25 07:26:59 -06:00
parent 330ab557ee
commit 34cb84f616
7 changed files with 208 additions and 34 deletions

View File

@@ -504,7 +504,7 @@
Konva.Factory.addGetterSetter(Konva.Shape, 'perfectDrawEnabled', true);
/**
* get/set perfectDrawEnabled. If a shape has fill, stroke and opacity you may set `perfectDrawEnabled` to improve performance.
* get/set perfectDrawEnabled. If a shape has fill, stroke and opacity you may set `perfectDrawEnabled` to false to improve performance.
* See http://konvajs.github.io/docs/performance/Disable_Perfect_Draw.html for more information.
* Default value is true
* @name perfectDrawEnabled

View File

@@ -1,6 +1,8 @@
/*eslint-disable max-depth */
(function() {
'use strict';
var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
// constants
var AUTO = 'auto',
//CANVAS = 'canvas',
@@ -159,6 +161,14 @@
context.closePath();
context.fillStrokeShape(this);
},
// _useBufferCanvas: function(caching) {
// var useIt = Konva.Shape.prototype._useBufferCanvas.call(this, caching);
// if (useIt) {
// return true;
// }
// return false;
// // return isFirefox && this.hasFill() && this.hasShadow();
// },
setText: function(text) {
var str = Konva.Util._isString(text) ? text : (text || '').toString();
this._setAttr(TEXT, str);