mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
build
This commit is contained in:
parent
3ef33af2ee
commit
888fe5870c
@ -15,4 +15,5 @@ deploy:
|
|||||||
secure: rYqyBhn3K8tnt/XK6RFodBiIsIqwmUuPBEAOQxRt/elK4F7BVC+ba7/xgsvdFLP+Bqn4sS8b/YjfxUqm0lfxoph3qvvyKZ+qjuGCXBtvbY8EgGqX3FJKq/LJp8Vu4encCUOpI3PWXQEB+0OrC8ntKnBn1L1WP6lzDbRHj49e9ew=
|
secure: rYqyBhn3K8tnt/XK6RFodBiIsIqwmUuPBEAOQxRt/elK4F7BVC+ba7/xgsvdFLP+Bqn4sS8b/YjfxUqm0lfxoph3qvvyKZ+qjuGCXBtvbY8EgGqX3FJKq/LJp8Vu4encCUOpI3PWXQEB+0OrC8ntKnBn1L1WP6lzDbRHj49e9ew=
|
||||||
on:
|
on:
|
||||||
tags: true
|
tags: true
|
||||||
|
all_branches: true
|
||||||
repo: konvajs/konva
|
repo: konvajs/konva
|
||||||
|
43
konva.js
43
konva.js
@ -3,7 +3,7 @@
|
|||||||
* Konva JavaScript Framework v0.7.1
|
* Konva JavaScript Framework v0.7.1
|
||||||
* http://konvajs.github.io/
|
* http://konvajs.github.io/
|
||||||
* Licensed under the MIT or GPL Version 2 licenses.
|
* Licensed under the MIT or GPL Version 2 licenses.
|
||||||
* Date: 2015-01-29
|
* Date: 2015-02-03
|
||||||
*
|
*
|
||||||
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
||||||
* Modified work Copyright (C) 2014 - 2015 by Anton Lavrenov (Konva)
|
* Modified work Copyright (C) 2014 - 2015 by Anton Lavrenov (Konva)
|
||||||
@ -2118,7 +2118,7 @@ var Konva = {};
|
|||||||
this.restore();
|
this.restore();
|
||||||
},
|
},
|
||||||
_stroke: function(shape) {
|
_stroke: function(shape) {
|
||||||
if(shape.hasStroke()) {
|
if(shape.hasStroke() && shape.strokeHit()) {
|
||||||
// ignore strokeScaleEnabled for Text
|
// ignore strokeScaleEnabled for Text
|
||||||
var strokeScaleEnabled = (shape.getStrokeScaleEnabled() || (shape instanceof Konva.Text));
|
var strokeScaleEnabled = (shape.getStrokeScaleEnabled() || (shape instanceof Konva.Text));
|
||||||
if (!strokeScaleEnabled) {
|
if (!strokeScaleEnabled) {
|
||||||
@ -4934,7 +4934,7 @@ var Konva = {};
|
|||||||
* @example
|
* @example
|
||||||
* node.cache();
|
* node.cache();
|
||||||
* node.filters([Konva.Filters.Mask]);
|
* node.filters([Konva.Filters.Mask]);
|
||||||
* node.threshold(0.1);
|
* node.threshold(200);
|
||||||
*/
|
*/
|
||||||
Konva.Filters.Mask = function(imageData) {
|
Konva.Filters.Mask = function(imageData) {
|
||||||
// Detect pixels close to the background color
|
// Detect pixels close to the background color
|
||||||
@ -7494,6 +7494,22 @@ var Konva = {};
|
|||||||
|
|
||||||
return Konva.Collection.toCollection(retArr);
|
return Konva.Collection.toCollection(retArr);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* return a first node from `find` method
|
||||||
|
* @method
|
||||||
|
* @memberof Konva.Container.prototype
|
||||||
|
* @param {String} selector
|
||||||
|
* @returns {Konva.Node}
|
||||||
|
* @example
|
||||||
|
* // select node with id foo
|
||||||
|
* var node = stage.findOne('#foo');
|
||||||
|
*
|
||||||
|
* // select node with name bar inside layer
|
||||||
|
* var nodes = layer.findOne('.bar');
|
||||||
|
*/
|
||||||
|
findOne : function(selector) {
|
||||||
|
return this.find(selector)[0];
|
||||||
|
},
|
||||||
_getNodeById: function(key) {
|
_getNodeById: function(key) {
|
||||||
var node = Konva.ids[key];
|
var node = Konva.ids[key];
|
||||||
|
|
||||||
@ -8197,6 +8213,27 @@ var Konva = {};
|
|||||||
* shape.strokeWidth();
|
* shape.strokeWidth();
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Konva.Factory.addGetterSetter(Konva.Shape, 'strokeHit', true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get/set stroke hit property. Useful for performance optimization.
|
||||||
|
* You may set `shape.strokeHit(false)`. In this case stroke will be no draw on hit canvas, so hit area
|
||||||
|
* of shape will be decreased (by lineWidth / 2). Remember that non closed line with `strokeHit = false`
|
||||||
|
* will be not drawn on hit canvas, that is mean line will no trigger pointer events (like mouseover)
|
||||||
|
* Default value is true
|
||||||
|
* @name strokeHit
|
||||||
|
* @method
|
||||||
|
* @memberof Konva.Shape.prototype
|
||||||
|
* @param {Boolean} strokeHit
|
||||||
|
* @returns {Boolean}
|
||||||
|
* @example
|
||||||
|
* // get strokeHit
|
||||||
|
* var strokeHit = shape.strokeHit();
|
||||||
|
*
|
||||||
|
* // set strokeHit
|
||||||
|
* shape.strokeHit();
|
||||||
|
*/
|
||||||
|
|
||||||
Konva.Factory.addGetterSetter(Konva.Shape, 'lineJoin');
|
Konva.Factory.addGetterSetter(Konva.Shape, 'lineJoin');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
8
konva.min.js
vendored
8
konva.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user