mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-29 09:44:41 +00:00
[BACK_INCOMPAT] fabric.Canvas#selection boolean property now only affects _group_ selection (i.e. blue area that allows to select multiple objects no longer appears). Objects can still be selected by clicking on them. To make _everything unselectable_ — set "selectable" property of each object to false AND fabric.Canvas#selection to false.
This commit is contained in:
parent
5627b5b06c
commit
36aeed700a
3 changed files with 23 additions and 11 deletions
28
dist/all.js
vendored
28
dist/all.js
vendored
|
|
@ -16,6 +16,11 @@ else {
|
|||
fabric.window = fabric.document.createWindow();
|
||||
}
|
||||
|
||||
/**
|
||||
* True when in environment that supports touch events
|
||||
* @property isTouchSupported
|
||||
* @type boolean
|
||||
*/
|
||||
fabric.isTouchSupported = "ontouchstart" in fabric.document.documentElement;
|
||||
/*
|
||||
http://www.JSON.org/json2.js
|
||||
|
|
@ -1673,10 +1678,14 @@ if (typeof console !== 'undefined') {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @namespace
|
||||
*/
|
||||
fabric.Observable = {
|
||||
|
||||
/**
|
||||
* @mthod observe
|
||||
* Observes specified event
|
||||
* @method observe
|
||||
* @param {String} eventName
|
||||
* @param {Function} handler
|
||||
*/
|
||||
|
|
@ -1699,8 +1708,8 @@ fabric.Observable = {
|
|||
},
|
||||
|
||||
/**
|
||||
* @mthod stopObserving
|
||||
* @memberOf fabric.util
|
||||
* Stops event observing for a particular event handler
|
||||
* @method stopObserving
|
||||
* @param {String} eventName
|
||||
* @param {Function} handler
|
||||
*/
|
||||
|
|
@ -1715,8 +1724,7 @@ fabric.Observable = {
|
|||
|
||||
/**
|
||||
* Fires event with an optional memo object
|
||||
* @mthod fire
|
||||
* @memberOf fabric.util
|
||||
* @method fire
|
||||
* @param {String} eventName
|
||||
* @param {Object} [memo]
|
||||
*/
|
||||
|
|
@ -1734,6 +1742,9 @@ fabric.Observable = {
|
|||
};
|
||||
(function() {
|
||||
|
||||
/**
|
||||
* @namespace
|
||||
*/
|
||||
fabric.util = { };
|
||||
|
||||
/**
|
||||
|
|
@ -4405,7 +4416,7 @@ fabric.util.string = {
|
|||
backgroundImage: '',
|
||||
|
||||
/**
|
||||
* Indicates whether object selection should be enabled
|
||||
* Indicates whether group selection should be enabled
|
||||
* @property
|
||||
* @type Boolean
|
||||
*/
|
||||
|
|
@ -5712,7 +5723,7 @@ fabric.util.string = {
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (this.selection && target && target.selectable) {
|
||||
if (target && target.selectable) {
|
||||
return target;
|
||||
}
|
||||
},
|
||||
|
|
@ -6717,6 +6728,7 @@ fabric.util.object.extend(fabric.Canvas.prototype, {
|
|||
fabric.Object = fabric.util.createClass(/** @scope fabric.Object.prototype */ {
|
||||
|
||||
/**
|
||||
* Type of an object (rect, circle, path, etc)
|
||||
* @property
|
||||
* @type String
|
||||
*/
|
||||
|
|
@ -10630,7 +10642,7 @@ fabric.util.object.extend(fabric.Canvas.prototype, {
|
|||
replacement.onload = function() {
|
||||
_this.setElement(replacement);
|
||||
callback && callback();
|
||||
replacement.onload = canvasEl = imgEl = imageData = null;
|
||||
replacement.onload = canvasEl = imgEl = null;
|
||||
};
|
||||
replacement.width = imgEl.width;
|
||||
replacement.height = imgEl.height;
|
||||
|
|
|
|||
2
site
2
site
|
|
@ -1 +1 @@
|
|||
Subproject commit 510c76dd0e0ee0549756997928145a079389c14b
|
||||
Subproject commit 461ac2fe5012c365380bf8d4587eecf1eefc498a
|
||||
|
|
@ -135,7 +135,7 @@
|
|||
backgroundImage: '',
|
||||
|
||||
/**
|
||||
* Indicates whether object selection should be enabled
|
||||
* Indicates whether group selection should be enabled
|
||||
* @property
|
||||
* @type Boolean
|
||||
*/
|
||||
|
|
@ -1442,7 +1442,7 @@
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (this.selection && target && target.selectable) {
|
||||
if (target && target.selectable) {
|
||||
return target;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue