Permalink
Browse files

Revert circle as rotating control for now (will need to figure out wh…

…y scaling occurs there).
  • Loading branch information...
1 parent bcde14c commit 09d6a6451df836d183a5b3a42c3a1dea70720990 @kangax committed May 15, 2012
Showing with 30 additions and 22 deletions.
  1. +14 −10 dist/all.js
  2. +1 −1 dist/all.min.js
  3. BIN dist/all.min.js.gz
  4. +1 −1 site
  5. +14 −10 src/object.class.js
View
@@ -7719,13 +7719,13 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, {
ctx.fillStyle = this.fill;
}
- if (this.group) {
- // TODO: this breaks some shapes, need to look into it
+ // TODO: this breaks some shapes, need to look into it
+ // if (this.group) {
// ctx.translate(
// -this.group.width / 2 + this.width / 2,
// -this.group.height / 2 + this.height / 2
// );
- }
+ // }
this._render(ctx, noTransform);
if (this.active && !noTransform) {
@@ -8031,13 +8031,17 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, {
// middle-top-rotate
if (this.hasRotatingPoint) {
- _left = left + this.width/2;
- _top = top - (45 / this.scaleY) + scaleOffsetY;
- ctx.save();
- ctx.beginPath();
- ctx.arc(_left, _top, sizeX / 2, 0, Math.PI * 2, false);
- ctx.fill();
- ctx.restore();
+ // _left = left + this.width/2;
+ // _top = top - (45 / this.scaleY) + scaleOffsetY;
+
+ // ctx.save();
+ // ctx.beginPath();
+ // ctx.arc(_left, _top, sizeX / 2, 0, Math.PI * 2, false);
+ // ctx.fill();
+ // ctx.restore();
+ _left = left + this.width/2 - scaleOffsetX;
+ _top = top - (45 / this.scaleY);
+ ctx.fillRect(_left, _top, sizeX, sizeY);
}
ctx.restore();
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
Binary file not shown.
2 site
Submodule site updated 63 files
+8 −0 assets/149.svg
+13 −1 docs/files.html
+1 −1 docs/index.html
+1 −1 docs/symbols/Array.html
+1 −1 docs/symbols/Function.html
+1 −1 docs/symbols/String.html
+97 −125 docs/symbols/_global_.html
+2 −2 docs/symbols/fabric.Canvas.html
+3 −3 docs/symbols/fabric.Circle.html
+1 −1 docs/symbols/fabric.Color.html
+1 −1 docs/symbols/fabric.Element.html
+3 −3 docs/symbols/fabric.Ellipse.html
+1 −1 docs/symbols/fabric.Gradient.html
+3 −3 docs/symbols/fabric.Group.html
+1 −1 docs/symbols/fabric.Image.filters.Grayscale.html
+1 −1 docs/symbols/fabric.Image.filters.Invert.html
+1 −1 docs/symbols/fabric.Image.filters.RemoveWhite.html
+1 −1 docs/symbols/fabric.Image.filters.html
+3 −3 docs/symbols/fabric.Image.html
+1 −1 docs/symbols/fabric.Intersection.html
+3 −3 docs/symbols/fabric.Line.html
+1 −179 docs/symbols/fabric.Object.html
+6 −6 docs/symbols/fabric.Observable.html
+3 −3 docs/symbols/fabric.Path.html
+3 −3 docs/symbols/fabric.PathGroup.html
+1 −1 docs/symbols/fabric.Point.html
+3 −3 docs/symbols/fabric.Polygon.html
+3 −3 docs/symbols/fabric.Polyline.html
+3 −3 docs/symbols/fabric.Rect.html
+1 −53 docs/symbols/fabric.StaticCanvas.html
+3 −3 docs/symbols/fabric.Text.html
+3 −3 docs/symbols/fabric.Triangle.html
+1 −1 docs/symbols/fabric.html
+1 −1 docs/symbols/fabric.util.array.html
+1 −1 docs/symbols/fabric.util.html
+1 −1 docs/symbols/fabric.util.object.html
+1 −1 docs/symbols/fabric.util.string.html
+1 −1 docs/symbols/src/HEADER.js.html
+108 −105 docs/symbols/src/src_canvas.animation.js.html
+1,186 −1,292 docs/symbols/src/src_object.class.js.html
+108 −0 docs/symbols/src/src_object_straightening.js.html
+10 −10 docs/symbols/src/src_observable.js.html
+1 −1 docs/symbols/src/src_path.class.js.html
+331 −344 docs/symbols/src/src_static_canvas.class.js.html
+109 −115 js/kitchensink.js
+670 −258 lib/fabric.js
+900 −900 lib/fabric_static.js
+83 −0 lib/stats.js
+25 −25 posts/benchmarks/_posts/2011-9-1-raphael-vs-fabric-simple.html
+3 −3 posts/demos/_posts/2011-9-1-hovering.html
+12 −12 posts/demos/_posts/2011-9-1-polaroid.html
+12 −12 posts/demos/_posts/2012-1-12-quadratic-curve.html
+18 −18 posts/featured/_posts/2011-9-1-customization.html
+3 −2 posts/featured/_posts/2011-9-1-kitchensink.html
+3 −3 posts/featured/_posts/2011-9-1-opacity_mouse_move.html
+1 −1 posts/featured/_posts/2011-9-1-stickman.html
+1 −1 test/svg_export/svg_shapes.html
+208 −208 test/unit/canvas.js
+148 −148 test/unit/canvas_static.js
+51 −49 test/unit/line.js
+0 −28 test/unit/object.js
+13 −13 test/unit/observable.js
+42 −23 test/unit/rect.js
View
@@ -370,13 +370,13 @@
ctx.fillStyle = this.fill;
}
- if (this.group) {
- // TODO: this breaks some shapes, need to look into it
+ // TODO: this breaks some shapes, need to look into it
+ // if (this.group) {
// ctx.translate(
// -this.group.width / 2 + this.width / 2,
// -this.group.height / 2 + this.height / 2
// );
- }
+ // }
this._render(ctx, noTransform);
if (this.active && !noTransform) {
@@ -682,13 +682,17 @@
// middle-top-rotate
if (this.hasRotatingPoint) {
- _left = left + this.width/2;
- _top = top - (45 / this.scaleY) + scaleOffsetY;
- ctx.save();
- ctx.beginPath();
- ctx.arc(_left, _top, sizeX / 2, 0, Math.PI * 2, false);
- ctx.fill();
- ctx.restore();
+ // _left = left + this.width/2;
+ // _top = top - (45 / this.scaleY) + scaleOffsetY;
+
+ // ctx.save();
+ // ctx.beginPath();
+ // ctx.arc(_left, _top, sizeX / 2, 0, Math.PI * 2, false);
+ // ctx.fill();
+ // ctx.restore();
+ _left = left + this.width/2 - scaleOffsetX;
+ _top = top - (45 / this.scaleY);
+ ctx.fillRect(_left, _top, sizeX, sizeY);
}
ctx.restore();

0 comments on commit 09d6a64

Please sign in to comment.