Skip to content

Commit

Permalink
performance update for marker
Browse files Browse the repository at this point in the history
  • Loading branch information
yanwsh committed Jul 2, 2017
1 parent d8ecdaa commit 5cf9726
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/scripts/Components/Marker.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ class Marker extends Component{
x: (vector.x + 1) / 2 * width,
y: - (vector.y - 1) / 2 * canvas._height
};
this.el().style.left = `${point.x}px`;
this.el().style.top = `${point.y}px`;
this.el().style.transform = `translate(${point.x}px, ${point.y}px)`;
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/scripts/Components/MarkerGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class MarkerGroup extends Component{
this.options.markers.forEach((markSetting)=>{
this.addMarker(markSetting);
});

this.renderMarkers();
}

attachEvents(){
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/Panorama.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const defaults: Settings = {
mobileVibrationValue: isIos()? 0.022 : 1,

VREnable: runOnMobile,
VRGapDegree: 2.5,
VRGapDegree: 0.5,
VRFullscreen: true,//auto fullscreen when in vr mode

PanoramaThumbnail: false,
Expand Down

0 comments on commit 5cf9726

Please sign in to comment.