Skip to content

Commit b8d3688

Browse files
committed
upd
1 parent 9907149 commit b8d3688

2 files changed

Lines changed: 2 additions & 30 deletions

File tree

dist/html2canvas.js

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,6 @@ GradientContainer.prototype.TYPES = {
262262
RADIAL: 2
263263
};
264264

265-
GradientContainer.prototype.angleRegExp = /([+-]?\d*\.?\d+)(deg|grad|rad|turn)/;
266-
267265
function ImageContainer(src, cors) {
268266
this.src = src;
269267
this.image = new Image();
@@ -447,32 +445,6 @@ function LinearGradientContainer(imageData) {
447445
this.x1 = x0;
448446
this.y1 = y0;
449447
break;
450-
default:
451-
var angle = position.match(this.angleRegExp);
452-
if (angle) {
453-
switch(angle[2]) {
454-
case "deg":
455-
var angleDeg = parseFloat(angle[1]);
456-
var radians = angleDeg / (180 / Math.PI);
457-
var slope = Math.tan(radians); // m
458-
459-
var perpendicularSlope = -1 / slope;
460-
461-
462-
463-
// y = 2
464-
// y = m * x
465-
// 2 = m * x
466-
467-
this.y0 = 2 / Math.tan(slope) / 2; // 1
468-
// console.log(radians, angle);
469-
this.x0 = 0;
470-
this.x1 = 1;
471-
this.y1 = 0;
472-
473-
break;
474-
}
475-
}
476448
}
477449
}, this);
478450
} else {

0 commit comments

Comments
 (0)