mirror of
https://github.com/konvajs/konva.git
synced 2026-01-24 05:45:14 +08:00
text shadow test
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user