-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1872 add thumbnails to canvas navigation
- Loading branch information
Showing
6 changed files
with
110 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import ManifestoCanvas from '../lib/ManifestoCanvas'; | ||
|
||
/** | ||
*/ | ||
export default class ValidationCanvas extends ManifestoCanvas { | ||
/** | ||
* 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 | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters