Skip to content

Commit 4988ac3

Browse files
author
theunreal
committed
Small syntax update
1 parent b0bbc5b commit 4988ac3

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-vrviewer",
3-
"version": "0.1.2",
3+
"version": "0.1.4",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/theunreal/angular-vrviewer"

src/vrview.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<div id="vrview" #viewer class="vr"></div>
1+
<div id="vrview" #viewer></div>

src/vrview.component.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component, Input, AfterViewInit, ViewChild } from '@angular/core';
22
import { Scene } from './scene.interface';
33

4-
declare let VRView;
4+
declare let VRView: any;
55

66
@Component({
77
selector: 'vrview',
@@ -10,7 +10,7 @@ declare let VRView;
1010
export class VRViewComponent implements AfterViewInit {
1111

1212
viewer: any;
13-
@ViewChild('viewer') viewerElement;
13+
@ViewChild('viewer') viewerElement: any;
1414

1515
@Input() scenes: Scene;
1616
@Input() width: any;
@@ -27,9 +27,8 @@ export class VRViewComponent implements AfterViewInit {
2727
});
2828

2929
this.viewer.on('ready',() => {
30-
3130
this.loadScene(this.getFirstScene());
32-
this.viewer.on('click', (event) => this.loadScene(event.id));
31+
this.viewer.on('click', (event) => event.id ? this.loadScene(event.id) : "");
3332
});
3433
}
3534

0 commit comments

Comments
 (0)