Skip to content

Commit

Permalink
Add fullscreen mode
Browse files Browse the repository at this point in the history
  • Loading branch information
binji committed Aug 26, 2020
1 parent 20d2503 commit 146ae67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions demo/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@
@click="canvas.scale = scale">
{{scale}}x
</button>
<button
v-show="loaded"
@click="toggleFullscreen">fullscreen
</button>
<span v-if="loaded">pal:{{pal}}</span>
<button
v-show="loaded" @click="palDown">-</button><button
Expand Down
1 change: 1 addition & 0 deletions demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ let vm = new Vue({
},
},
methods: {
toggleFullscreen: function() { $('canvas').requestFullscreen(); },
palDown: function() { this.setPal(this.pal - 1); },
palUp: function() { this.setPal(this.pal + 1); },
setPal: function(pal) {
Expand Down

0 comments on commit 146ae67

Please sign in to comment.