fabric-rails 1.0.11 → 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/fabric/rails/version.rb +2 -2
- data/vendor/assets/javascripts/fabric.js +30 -30
- metadata +2 -2
data/lib/fabric/rails/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/* build: `node build.js modules=ALL exclude=gestures` */
|
2
2
|
/*! Fabric.js Copyright 2008-2013, Printio (Juriy Zaytsev, Maxim Chernyak) */
|
3
3
|
|
4
|
-
var fabric = fabric || { version: "1.0.
|
4
|
+
var fabric = fabric || { version: "1.0.12" };
|
5
5
|
|
6
6
|
if (typeof exports !== 'undefined') {
|
7
7
|
exports.fabric = fabric;
|
@@ -5744,7 +5744,7 @@ fabric.Shadow = fabric.util.createClass(/** @scope fabric.Shadow.prototype */ {
|
|
5744
5744
|
clipTo: null,
|
5745
5745
|
|
5746
5746
|
/**
|
5747
|
-
* Indicates whether object controls (borders/
|
5747
|
+
* Indicates whether object controls (borders/controls) are rendered above overlay image
|
5748
5748
|
* @property
|
5749
5749
|
* @type Boolean
|
5750
5750
|
*/
|
@@ -6056,11 +6056,11 @@ fabric.Shadow = fabric.util.createClass(/** @scope fabric.Shadow.prototype */ {
|
|
6056
6056
|
if (!object) return;
|
6057
6057
|
|
6058
6058
|
if (this.controlsAboveOverlay) {
|
6059
|
-
var hasBorders = object.hasBorders,
|
6060
|
-
object.hasBorders = object.
|
6059
|
+
var hasBorders = object.hasBorders, hasControls = object.hasControls;
|
6060
|
+
object.hasBorders = object.hasControls = false;
|
6061
6061
|
object.render(ctx);
|
6062
6062
|
object.hasBorders = hasBorders;
|
6063
|
-
object.
|
6063
|
+
object.hasControls = hasControls;
|
6064
6064
|
}
|
6065
6065
|
else {
|
6066
6066
|
object.render(ctx);
|
@@ -6288,7 +6288,7 @@ fabric.Shadow = fabric.util.createClass(/** @scope fabric.Shadow.prototype */ {
|
|
6288
6288
|
}
|
6289
6289
|
|
6290
6290
|
// delegate rendering to group selection if one exists
|
6291
|
-
// used for drawing selection borders/
|
6291
|
+
// used for drawing selection borders/controls
|
6292
6292
|
var activeGroup = this.getActiveGroup();
|
6293
6293
|
if (activeGroup) {
|
6294
6294
|
activeGroup.render(ctx);
|
@@ -6304,7 +6304,7 @@ fabric.Shadow = fabric.util.createClass(/** @scope fabric.Shadow.prototype */ {
|
|
6304
6304
|
},
|
6305
6305
|
|
6306
6306
|
/**
|
6307
|
-
* Draws objects' controls (borders/
|
6307
|
+
* Draws objects' controls (borders/controls)
|
6308
6308
|
* @method drawControls
|
6309
6309
|
* @param {Object} ctx context to render controls on
|
6310
6310
|
*/
|
@@ -6313,7 +6313,7 @@ fabric.Shadow = fabric.util.createClass(/** @scope fabric.Shadow.prototype */ {
|
|
6313
6313
|
if (activeGroup) {
|
6314
6314
|
ctx.save();
|
6315
6315
|
fabric.Group.prototype.transform.call(activeGroup, ctx);
|
6316
|
-
activeGroup.drawBorders(ctx).
|
6316
|
+
activeGroup.drawBorders(ctx).drawControls(ctx);
|
6317
6317
|
ctx.restore();
|
6318
6318
|
}
|
6319
6319
|
else {
|
@@ -6322,7 +6322,7 @@ fabric.Shadow = fabric.util.createClass(/** @scope fabric.Shadow.prototype */ {
|
|
6322
6322
|
|
6323
6323
|
ctx.save();
|
6324
6324
|
fabric.Object.prototype.transform.call(this._objects[i], ctx);
|
6325
|
-
this._objects[i].drawBorders(ctx).
|
6325
|
+
this._objects[i].drawBorders(ctx).drawControls(ctx);
|
6326
6326
|
ctx.restore();
|
6327
6327
|
|
6328
6328
|
this.lastRenderedObjectWithControlsAboveOverlay = this._objects[i];
|
@@ -6374,7 +6374,7 @@ fabric.Shadow = fabric.util.createClass(/** @scope fabric.Shadow.prototype */ {
|
|
6374
6374
|
|
6375
6375
|
if (activeGroup) {
|
6376
6376
|
// not removing group due to complications with restoring it with correct state afterwords
|
6377
|
-
this.
|
6377
|
+
this._tempRemoveBordersControlsFromGroup(activeGroup);
|
6378
6378
|
}
|
6379
6379
|
else if (activeObject && this.deactivateAll) {
|
6380
6380
|
this.deactivateAll();
|
@@ -6393,7 +6393,7 @@ fabric.Shadow = fabric.util.createClass(/** @scope fabric.Shadow.prototype */ {
|
|
6393
6393
|
this.setWidth(origWidth).setHeight(origHeight);
|
6394
6394
|
|
6395
6395
|
if (activeGroup) {
|
6396
|
-
this.
|
6396
|
+
this._restoreBordersControlsOnGroup(activeGroup);
|
6397
6397
|
}
|
6398
6398
|
else if (activeObject && this.setActiveObject) {
|
6399
6399
|
this.setActiveObject(activeObject);
|
@@ -6407,13 +6407,13 @@ fabric.Shadow = fabric.util.createClass(/** @scope fabric.Shadow.prototype */ {
|
|
6407
6407
|
|
6408
6408
|
/**
|
6409
6409
|
* @private
|
6410
|
-
* @method
|
6410
|
+
* @method _tempRemoveBordersControlsFromGroup
|
6411
6411
|
*/
|
6412
|
-
|
6413
|
-
group.
|
6412
|
+
_tempRemoveBordersControlsFromGroup: function(group) {
|
6413
|
+
group.origHasControls = group.hasControls;
|
6414
6414
|
group.origBorderColor = group.borderColor;
|
6415
6415
|
|
6416
|
-
group.
|
6416
|
+
group.hasControls = true;
|
6417
6417
|
group.borderColor = 'rgba(0,0,0,0)';
|
6418
6418
|
|
6419
6419
|
group.forEachObject(function(o) {
|
@@ -6424,10 +6424,10 @@ fabric.Shadow = fabric.util.createClass(/** @scope fabric.Shadow.prototype */ {
|
|
6424
6424
|
|
6425
6425
|
/**
|
6426
6426
|
* @private
|
6427
|
-
* @method
|
6427
|
+
* @method _restoreBordersControlsOnGroup
|
6428
6428
|
*/
|
6429
|
-
|
6430
|
-
group.
|
6429
|
+
_restoreBordersControlsOnGroup: function(group) {
|
6430
|
+
group.hideControls = group.origHideControls;
|
6431
6431
|
group.borderColor = group.origBorderColor;
|
6432
6432
|
|
6433
6433
|
group.forEachObject(function(o) {
|
@@ -9632,8 +9632,8 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @scope fabric.Stati
|
|
9632
9632
|
* Sets property to a given value
|
9633
9633
|
* @method set
|
9634
9634
|
* @param {String} name
|
9635
|
-
* @param {Object|Function} value
|
9636
|
-
* @return {fabric.
|
9635
|
+
* @param {Object|Function} value (if function, the value is passed into it and its return value is used as a new one)
|
9636
|
+
* @return {fabric.Object} thisArg
|
9637
9637
|
* @chainable
|
9638
9638
|
*/
|
9639
9639
|
set: function(key, value) {
|
@@ -9761,7 +9761,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @scope fabric.Stati
|
|
9761
9761
|
|
9762
9762
|
if (this.active && !noTransform) {
|
9763
9763
|
this.drawBorders(ctx);
|
9764
|
-
this.
|
9764
|
+
this.drawControls(ctx);
|
9765
9765
|
}
|
9766
9766
|
ctx.restore();
|
9767
9767
|
},
|
@@ -11065,12 +11065,12 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @scope fabric.Stati
|
|
11065
11065
|
* Draws corners of an object's bounding box.
|
11066
11066
|
* Requires public properties: width, height, scaleX, scaleY
|
11067
11067
|
* Requires public options: cornerSize, padding
|
11068
|
-
* @method
|
11068
|
+
* @method drawControls
|
11069
11069
|
* @param {CanvasRenderingContext2D} ctx Context to draw on
|
11070
11070
|
* @return {fabric.Object} thisArg
|
11071
11071
|
* @chainable
|
11072
11072
|
*/
|
11073
|
-
|
11073
|
+
drawControls: function(ctx) {
|
11074
11074
|
if (!this.hasControls) return;
|
11075
11075
|
|
11076
11076
|
var size = this.cornerSize,
|
@@ -13035,7 +13035,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @scope fabric.Stati
|
|
13035
13035
|
}
|
13036
13036
|
if (!noTransform && this.active) {
|
13037
13037
|
this.drawBorders(ctx);
|
13038
|
-
this.
|
13038
|
+
this.drawControls(ctx);
|
13039
13039
|
}
|
13040
13040
|
ctx.restore();
|
13041
13041
|
},
|
@@ -13342,7 +13342,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @scope fabric.Stati
|
|
13342
13342
|
|
13343
13343
|
if (this.active) {
|
13344
13344
|
this.drawBorders(ctx);
|
13345
|
-
this.
|
13345
|
+
this.drawControls(ctx);
|
13346
13346
|
}
|
13347
13347
|
ctx.restore();
|
13348
13348
|
},
|
@@ -13593,7 +13593,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @scope fabric.Stati
|
|
13593
13593
|
object.setCoords();
|
13594
13594
|
|
13595
13595
|
// do not display corners of objects enclosed in a group
|
13596
|
-
object.
|
13596
|
+
object.hasControls = false;
|
13597
13597
|
}, this);
|
13598
13598
|
},
|
13599
13599
|
|
@@ -13759,7 +13759,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @scope fabric.Stati
|
|
13759
13759
|
|
13760
13760
|
if (!noTransform && this.active) {
|
13761
13761
|
this.drawBorders(ctx);
|
13762
|
-
this.
|
13762
|
+
this.drawControls(ctx);
|
13763
13763
|
}
|
13764
13764
|
ctx.restore();
|
13765
13765
|
this.setCoords();
|
@@ -13823,7 +13823,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @scope fabric.Stati
|
|
13823
13823
|
object.set('scaleY', object.get('scaleY') * this.get('scaleY'));
|
13824
13824
|
|
13825
13825
|
object.setCoords();
|
13826
|
-
object.
|
13826
|
+
object.hasControls = true;
|
13827
13827
|
object.setActive(false);
|
13828
13828
|
object.setCoords();
|
13829
13829
|
|
@@ -14168,7 +14168,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @scope fabric.Stati
|
|
14168
14168
|
|
14169
14169
|
if (this.active && !noTransform) {
|
14170
14170
|
this.drawBorders(ctx);
|
14171
|
-
this.
|
14171
|
+
this.drawControls(ctx);
|
14172
14172
|
}
|
14173
14173
|
ctx.restore();
|
14174
14174
|
},
|
@@ -16024,7 +16024,7 @@ fabric.Image.filters.Pixelate.fromObject = function(object) {
|
|
16024
16024
|
this._render(ctx);
|
16025
16025
|
if (!noTransform && this.active) {
|
16026
16026
|
this.drawBorders(ctx);
|
16027
|
-
this.
|
16027
|
+
this.drawControls(ctx);
|
16028
16028
|
}
|
16029
16029
|
ctx.restore();
|
16030
16030
|
},
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fabric-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-21 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: This gem provides fabric.js for your Rails 3 application via the asset
|
15
15
|
pipeline.
|