Skip to content

Commit

Permalink
add drag/drop svg text
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjlockwood committed Aug 3, 2017
1 parent 5891a55 commit 06f9dd2
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 17 deletions.
27 changes: 14 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"zone.js": "^0.8.16"
},
"devDependencies": {
"@angular/cli": "^1.2.6",
"@angular/cli": "^1.2.7",
"@angular/compiler-cli": "^4.3.3",
"@angular/language-service": "^4.3.3",
"@types/es6-promise": "0.0.32",
Expand Down
4 changes: 1 addition & 3 deletions src/app/components/canvas/canvas.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ export class CanvasComponent extends CanvasLayoutMixin(DestroyableMixin())
ngAfterViewInit() {
const activeViewport$ = this.store
.select(getVectorLayer)
.map(vl => {
return { w: vl.width, h: vl.height };
})
.map(vl => ({ w: vl.width, h: vl.height }))
.distinctUntilChanged((x, y) => _.isEqual(x, y));
this.registerSubscription(
Observable.combineLatest(this.canvasBounds$, activeViewport$)
Expand Down
3 changes: 3 additions & 0 deletions src/app/components/layertimeline/_layertimeline-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
}
}
}
.slt-layers-empty {
color: mat-color($foreground, disabled-text);
}
.slt-timeline {
.slt-timeline-animation {
box-shadow: 4px 0 0 mat-color(mat-palette($mat-grey, 500)), -4px 0 0 mat-color(mat-palette($mat-grey, 500));
Expand Down
4 changes: 4 additions & 0 deletions src/app/components/layertimeline/layertimeline.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@
'top': dragData.top + 'px'
}">
</div>
<div class="slt-layers-empty"
*ngIf="model.vectorLayer.children.length === 0">
To get started, drag + drop an SVG file here
</div>
</div>
</div>

Expand Down
6 changes: 6 additions & 0 deletions src/app/components/layertimeline/layertimeline.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@
}
}
}
.slt-layers-empty {
padding: 32px;
text-align: center;
font-size: 14px;
line-height: 20px;
}
.slt-timeline {
overflow-x: auto;
overflow-y: hidden;
Expand Down

0 comments on commit 06f9dd2

Please sign in to comment.