canvas left and top inline styles are now set to 0

This commit is contained in:
Eric Rowell
2013-07-21 23:14:41 -07:00
parent 7341384edf
commit 1d5eff629a
4 changed files with 69 additions and 61 deletions

View File

@@ -36,13 +36,13 @@ function warn(condition, message) {
}
function testDataUrl(actual, key, message) {
var expected = dataUrls[key];
if(actual !== expected) {
if(testCounter.style.backgroundColor != 'red') {
testCounter.style.backgroundColor = 'orange';
testCounter.style.color = 'black';
}
console.warn(message + ' (NOTE: use Google Chrome for data url comparisons, run on web server for caching and filtering)');
console.warn(message + ' (NOTE: use Google Chrome for data url comparisons, run on web server for caching and filtering)');
}
numTests++;
testCounter.innerHTML = numTests;
@@ -55,7 +55,7 @@ function testJSON(actual, expected, message) {
testCounter.style.color = 'black';
}
console.warn(message + ' (NOTE: use Google Chrome for data url comparisons, run on web server for caching and filtering)');
console.log('actual:');
console.log(actual);
console.log('expected:');
@@ -69,6 +69,7 @@ function log(message) {
}
function showHit(layer) {
layer.hitCanvas.element.style.position = 'relative';
document.body.appendChild(layer.hitCanvas.element);
}
@@ -119,11 +120,11 @@ Test.prototype = {
}
}
};
// loop through modules
for(var mod in modules) {
console.log('=================== ' + mod + ' TESTS ===================');
var tests = modules[mod];
// loop through tests
@@ -137,10 +138,10 @@ Test.prototype = {
obj.testMessage.setAttribute('class', 'gray');
}
}
}
console.log('=================== ASYNC OUTPUT ===================');
}
};

View File

@@ -27,6 +27,8 @@ Test.Modules.LAYER = {
test(style.margin === '0px', 'canvas margin style should be 0px');
test(style.padding === '0px', 'canvas padding style should be 0px');
test(style.backgroundColor === 'transparent', 'canvas backgroundColor style should be transparent');
test(style.top === '0px', 'canvas top should be 0px');
test(style.left === '0px', 'canvas left should be 0px');
},
'layer getIntersection()': function(containerId) {