aboutsummaryrefslogtreecommitdiff
path: root/src/components/TileTree.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-03-16 23:13:53 +1100
committerTerry Truong <terry06890@gmail.com>2022-03-16 23:13:53 +1100
commitb3b2ba0d961065ce70803c939440c9cff7e89db6 (patch)
tree1dcd1d12ad6b731b9fbab61a2143eeb6d84e4554 /src/components/TileTree.vue
parent86f1cb98bb9bf21ce94e8dc278a4c9287e950798 (diff)
Clean up sqrLayoutFn() code
Diffstat (limited to 'src/components/TileTree.vue')
-rw-r--r--src/components/TileTree.vue9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/TileTree.vue b/src/components/TileTree.vue
index ab8ba1b..fc60a49 100644
--- a/src/components/TileTree.vue
+++ b/src/components/TileTree.vue
@@ -22,9 +22,9 @@ let layoutOptions: LayoutOptions = {
//integer values specify pixels
tileSpacing: 5,
headerSz: 20,
- minTileSz: 20,
- maxTileSz: 500,
- layoutType: 'sqr', //'sqr' | 'rect' | 'sweep'
+ minTileSz: 50,
+ maxTileSz: 200,
+ layoutType: 'sweep', //'sqr' | 'rect' | 'sweep'
rectMode: 'auto', //'horz' | 'vert' | 'linear' | 'auto'
sweepMode: 'left', //'left' | 'top' | 'shorter' | 'auto'
sweptNodesPrio: 'sqrt', //'linear' | 'sqrt' | 'sqrt-when-high'
@@ -80,8 +80,9 @@ export default defineComponent({
},
created(){
window.addEventListener('resize', this.onResize);
- if (!this.layoutTree.tryLayout([0,0], [this.width,this.height]))
+ if (!this.layoutTree.tryLayout([0,0], [this.width,this.height])){
console.log('Unable to layout tree');
+ }
},
unmounted(){
window.removeEventListener('resize', this.onResize);