mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
padding width needs to be in pixels
This commit is contained in:
parent
5df8059cfd
commit
d479774986
@ -76,7 +76,6 @@ $(function() {
|
|||||||
} else if (expect === "thick") {
|
} else if (expect === "thick") {
|
||||||
expect = "5px";
|
expect = "5px";
|
||||||
}
|
}
|
||||||
|
|
||||||
QUnit.equal( _html2canvas.Util.getCSS(el, prop), expect, "div #" + (i + 1) + " property " + prop + " equals " + $(el).css(prop) );
|
QUnit.equal( _html2canvas.Util.getCSS(el, prop), expect, "div #" + (i + 1) + " property " + prop + " equals " + $(el).css(prop) );
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -86,10 +85,12 @@ $(function() {
|
|||||||
var propsToTest2 = ["paddingTop", "paddingRight", "paddingBottom", "paddingLeft"],
|
var propsToTest2 = ["paddingTop", "paddingRight", "paddingBottom", "paddingLeft"],
|
||||||
numDivs2 = $('#padding div').length;
|
numDivs2 = $('#padding div').length;
|
||||||
|
|
||||||
test('padding width', propsToTest2.length * numDivs2, function() {
|
test('padding width', propsToTest2.length * numDivs2 * 2, function() {
|
||||||
|
|
||||||
$('#padding div').each(function(i, el) {
|
$('#padding div').each(function(i, el) {
|
||||||
$.each(propsToTest2, function(s, prop) {
|
$.each(propsToTest2, function(s, prop) {
|
||||||
|
var isPx = _html2canvas.Util.getCSS(el, prop).indexOf("px");
|
||||||
|
QUnit.notEqual( isPx, -1, "div #" + (i + 1) + " property " + prop + " is in pixels" );
|
||||||
QUnit.equal( _html2canvas.Util.getCSS(el, prop), $(el).css(prop), "div #" + (i + 1) + " property " + prop + " equals " + $(el).css(prop) );
|
QUnit.equal( _html2canvas.Util.getCSS(el, prop), $(el).css(prop), "div #" + (i + 1) + " property " + prop + " equals " + $(el).css(prop) );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user