Skip to content

Commit

Permalink
2.8.9
Browse files Browse the repository at this point in the history
  • Loading branch information
koggdal committed Jul 5, 2017
1 parent c8c1862 commit a1ed3e7
Show file tree
Hide file tree
Showing 8 changed files with 6,373 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build/config
@@ -1,4 +1,4 @@
version = 2.8.8
version = 2.8.9
source_dir = ../src/
output_full = ocanvas-{version}.js
output_min = ocanvas-{version}.min.js
Expand Down
31 changes: 29 additions & 2 deletions build/dist/latest/ocanvas.js
@@ -1,5 +1,5 @@
/*!
* oCanvas v2.8.8
* oCanvas v2.8.9
* http://ocanvas.org/
*
* Copyright 2011-2017, Johannes Koggdal
Expand All @@ -16,7 +16,7 @@
var oCanvas = {

// Version number of this oCanvas release.
version: "2.8.8",
version: "2.8.9",

// Array containing all canvases created by oCanvas on the current page
canvasList: [],
Expand Down Expand Up @@ -5575,6 +5575,33 @@
get radius_y () {
return this._.radius_y;
},

getOrigin: function () {
var x = 0;
var y = 0;
var origin = this.origin;

if (this.origin.x === "right") {
x = this.radius_x;
} else if (this.origin.x === "left") {
x = -this.radius_x;
} else {
x = !isNaN(parseFloat(this.origin.x)) ? parseFloat(this.origin.x) : 0;
}

if (this.origin.y === "bottom") {
y = this.radius_y;
} else if (this.origin.y === "top") {
y = -this.radius_y;
} else {
y = !isNaN(parseFloat(this.origin.y)) ? parseFloat(this.origin.y) : 0;
}

return {
x: x,
y: y
};
},

draw: function () {
var canvas = this.core.canvas,
Expand Down
4 changes: 2 additions & 2 deletions build/dist/latest/ocanvas.min.js

Large diffs are not rendered by default.

0 comments on commit a1ed3e7

Please sign in to comment.