Skip to content
Snippets Groups Projects
Commit 169bd316 authored by Glenn Fischer's avatar Glenn Fischer
Browse files

#1888 move implementation of <ValidationCanvas> into <ManifestoCanvas>

parent df616ce5
Branches
Tags
No related merge requests found
...@@ -39,6 +39,36 @@ export default class ManifestoCanvas { ...@@ -39,6 +39,36 @@ export default class ManifestoCanvas {
}/info.json`; }/info.json`;
} }
/**
* checks whether the canvas has a valid height
*/
get hasValidHeight() {
return (
typeof this.canvas.getHeight() === 'number'
&& this.canvas.getHeight() > 0
);
}
/**
* checks whether the canvas has a valid height
*/
get hasValidWidth() {
return (
typeof this.canvas.getHeight() === 'number'
&& this.canvas.getHeight() > 0
);
}
/**
* checks whether the canvas has valid dimensions
*/
get hasValidDimensions() {
return (
this.hasValidHeight
&& this.hasValidWidth
);
}
/** /**
* Creates a canonical image request for a thumb * Creates a canonical image request for a thumb
* @param {Number} height * @param {Number} height
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment