small optimization

This commit is contained in:
Лаврёнов Антон
2014-05-29 14:13:10 +08:00
parent 540f526c4e
commit 24f7bdbafc
3 changed files with 11 additions and 13 deletions

View File

@@ -4,7 +4,7 @@
* http://www.kineticjs.com/
* Copyright 2013, Eric Rowell
* Licensed under the MIT or GPL Version 2 licenses.
* Date: 2014-05-22
* Date: 2014-05-29
*
* Copyright (C) 2011 - 2013 by Eric Rowell
*
@@ -10837,9 +10837,8 @@ var Kinetic = {};
this.sceneFunc(this._sceneFunc);
},
_sceneFunc: function(context) {
var r = this.getRadius(),
rx = r.x,
ry = r.y;
var rx = this.getRadiusX(),
ry = this.getRadiusY();
context.beginPath();
context.save();
@@ -10853,11 +10852,11 @@ var Kinetic = {};
},
// implements Shape.prototype.getWidth()
getWidth: function() {
return this.getRadius().x * 2;
return this.getRadiusX() * 2;
},
// implements Shape.prototype.getHeight()
getHeight: function() {
return this.getRadius().y * 2;
return this.getRadiusY() * 2;
},
// implements Shape.prototype.setWidth()
setWidth: function(width) {

4
kinetic.min.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -32,9 +32,8 @@
this.sceneFunc(this._sceneFunc);
},
_sceneFunc: function(context) {
var r = this.getRadius(),
rx = r.x,
ry = r.y;
var rx = this.getRadiusX(),
ry = this.getRadiusY();
context.beginPath();
context.save();
@@ -48,11 +47,11 @@
},
// implements Shape.prototype.getWidth()
getWidth: function() {
return this.getRadius().x * 2;
return this.getRadiusX() * 2;
},
// implements Shape.prototype.getHeight()
getHeight: function() {
return this.getRadius().y * 2;
return this.getRadiusY() * 2;
},
// implements Shape.prototype.setWidth()
setWidth: function(width) {