Skip to content

fuzzco/full-canvas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto-resizing canvas. Demo

npm i @fuzzco/full-canvas

Register component in Vue, then:

<template>
    <main>
        <!-- canvas that resizes to fit its container (positions: absolute, top/right/bottom/left: 0) -->
        <full-canvas />

        <!-- lower rect-throttle value for smoother resizing, at the cost of more expensive calculations -->
        <full-canvas rect-throttle="20" />
    </main>
</template>

Options

Prop Type Default Notes
rect-throttle [String, Number] 150 How often the canvas resizes itself, in ms

Events

Event Params Notes
canvas-ready (canvas) Fires after all initialization has completed and canvas is ready. Looking for the canvas before this point doesn't guarantee that the canvas will exist.

Releases

No releases published

Packages

No packages published