Fix gradient tests

This commit is contained in:
Niklas von Hertzen 2015-10-18 23:57:41 +03:00
parent 5b4a6c26ee
commit aa05241ff8
4 changed files with 4 additions and 5 deletions

3
dist/html2canvas.js vendored
View File

@ -2412,7 +2412,7 @@ module.exports = ImageLoader;
var GradientContainer = require('./gradientcontainer');
var Color = require('./color');
var COLOR_STOP_REGEXP = /^(.*)\s*(\d{1,3})?(%|px)?$/;
var COLOR_STOP_REGEXP = /^\s*(.*)\s*(\d{1,3})?(%|px)?$/;
function LinearGradientContainer(imageData) {
GradientContainer.apply(this, arguments);
@ -2454,7 +2454,6 @@ function LinearGradientContainer(imageData) {
this.y1 = 1;
}
this.colorStops = imageData.args.slice(hasDirection ? 1 : 0)
.map(function(colorStop) { return colorStop.match(COLOR_STOP_REGEXP);})
.filter(function(colorStopMatch) { return !!colorStopMatch;})

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
var GradientContainer = require('./gradientcontainer');
var Color = require('./color');
var COLOR_STOP_REGEXP = /^(.*)\s*(\d{1,3})?(%|px)?$/;
var COLOR_STOP_REGEXP = /^\s*(.*)\s*(\d{1,3})?(%|px)?$/;
function LinearGradientContainer(imageData) {
GradientContainer.apply(this, arguments);
@ -43,7 +43,6 @@ function LinearGradientContainer(imageData) {
this.y1 = 1;
}
this.colorStops = imageData.args.slice(hasDirection ? 1 : 0)
.map(function(colorStop) { return colorStop.match(COLOR_STOP_REGEXP);})
.filter(function(colorStopMatch) { return !!colorStopMatch;})

View File

@ -110,6 +110,7 @@
}
.linearGradient4 {
background: -webkit-linear-gradient(0deg, #ddd, #ddd 50%, transparent 50%);
background: linear-gradient(0deg, #ddd, #ddd 50%, transparent 50%);
}