mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-03 01:38:11 +08:00
Clean up Vue component refs (#813)
* Clean up Vue component refs * Second pass of code improvements
This commit is contained in:
@@ -113,7 +113,9 @@ export default defineComponent({
|
||||
},
|
||||
methods: {
|
||||
displayImageDataPreview(imageData: ImageData | undefined) {
|
||||
const canvas = this.$refs.zoomPreviewCanvas as HTMLCanvasElement;
|
||||
const canvas = this.$refs.zoomPreviewCanvas as HTMLCanvasElement | undefined;
|
||||
if (!canvas) return;
|
||||
|
||||
canvas.width = ZOOM_WINDOW_DIMENSIONS;
|
||||
canvas.height = ZOOM_WINDOW_DIMENSIONS;
|
||||
const context = canvas.getContext("2d");
|
||||
|
||||
Reference in New Issue
Block a user