|
13 | 13 | : Retrieve the *Bse.Part* set via the `part` property.
|
14 | 14 | </docs>
|
15 | 15 |
|
16 |
| -<template> |
17 |
| - |
18 |
| - <div class="b-piano-roll" style="display: flex; flex-direction: column; width: 100%;"> |
19 |
| - <div style="display: flex; width: 100%; flex-shrink: 0;"> |
20 |
| - <div ref="piano-roll-buttons" class="b-piano-roll-buttons" style="flex-shrink: 0; display: flex" > |
21 |
| - <button >I</button> |
22 |
| - <button >m</button> |
23 |
| - <button >q</button> |
24 |
| - <b-color-picker style="flex-shrink: 1" ></b-color-picker> |
25 |
| - </div> |
26 |
| - <b-hscrollbar ref="hscrollbar" slider-size='45' style="width: 100%;" ></b-hscrollbar> |
27 |
| - </div> |
28 |
| - <div ref="scrollcontainer" style="overflow-y: scroll" > |
29 |
| - <div ref="scrollarea" style="display: flex; flex-direction: column; overflow: hidden;" > |
30 |
| - <div :style="{ |
31 |
| - display: 'flex', |
32 |
| - 'flex-direction': 'row', |
33 |
| - height: piano_roll_cssheight + 'px', |
34 |
| - width: '100%', |
35 |
| - 'background-color': 'blue', |
36 |
| - }" > |
37 |
| - <canvas ref="piano-canvas" class="b-piano-roll-piano tabular-nums" :style="{ height: piano_roll_cssheight + 'px', }" @click="$forceUpdate()" ></canvas> |
38 |
| - <canvas ref="notes-canvas" class="b-piano-roll-notes tabular-nums" :style="{ height: piano_roll_cssheight + 'px', }" @click="$forceUpdate()" ></canvas> |
39 |
| - </div> |
40 |
| - </div> |
41 |
| - </div> |
42 |
| - </div> |
43 |
| - |
44 |
| -</template> |
45 |
| - |
46 | 16 | <style lang="scss">
|
47 | 17 | @import 'styles.scss';
|
48 | 18 | .b-piano-roll {
|
|
83 | 53 | }
|
84 | 54 | </style>
|
85 | 55 |
|
| 56 | +<template> |
| 57 | + |
| 58 | + <div class="b-piano-roll" style="display: flex; flex-direction: column; width: 100%;"> |
| 59 | + <div style="display: flex; width: 100%; flex-shrink: 0;"> |
| 60 | + <div ref="piano-roll-buttons" class="b-piano-roll-buttons" style="flex-shrink: 0; display: flex" > |
| 61 | + <button >I</button> |
| 62 | + <button >m</button> |
| 63 | + <button >q</button> |
| 64 | + <b-color-picker style="flex-shrink: 1" ></b-color-picker> |
| 65 | + </div> |
| 66 | + <b-hscrollbar ref="hscrollbar" slider-size='45' style="width: 100%;" ></b-hscrollbar> |
| 67 | + </div> |
| 68 | + <div ref="scrollcontainer" style="overflow-y: scroll" > |
| 69 | + <div ref="scrollarea" style="display: flex; flex-direction: column; overflow: hidden;" > |
| 70 | + <div :style="{ |
| 71 | + display: 'flex', |
| 72 | + 'flex-direction': 'row', |
| 73 | + height: piano_roll_cssheight + 'px', |
| 74 | + width: '100%', |
| 75 | + 'background-color': 'blue', |
| 76 | + }" > |
| 77 | + <canvas ref="piano-canvas" class="b-piano-roll-piano tabular-nums" :style="{ height: piano_roll_cssheight + 'px', }" @click="$forceUpdate()" ></canvas> |
| 78 | + <canvas ref="notes-canvas" class="b-piano-roll-notes tabular-nums" :style="{ height: piano_roll_cssheight + 'px', }" @click="$forceUpdate()" ></canvas> |
| 79 | + </div> |
| 80 | + </div> |
| 81 | + </div> |
| 82 | + </div> |
| 83 | + |
| 84 | +</template> |
| 85 | + |
86 | 86 | <script>
|
87 | 87 | const floor = Math.floor, round = Math.round;
|
88 | 88 | const piano_roll_cssheight = 841;
|
|
0 commit comments