Skip to content

Commit

Permalink
add tooltips to buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Apr 24, 2015
1 parent c7fea9c commit 2d16df1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/PSVNavBarAutorotateButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ PSVNavBarAutorotateButton.prototype.constructor = PSVNavBarAutorotateButton;
PSVNavBarAutorotateButton.prototype.create = function() {
this.button = document.createElement('div');
this.button.className = 'psv-button psv-autorotate-button';
this.button.title = this.psv.config.lang.autorotate;

var autorotate_sphere = document.createElement('div');
autorotate_sphere.className = 'psv-autorotate-sphere';
Expand Down
1 change: 1 addition & 0 deletions src/PSVNavBarDownloadButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ PSVNavBarDownloadButton.prototype.constructor = PSVNavBarDownloadButton;
PSVNavBarDownloadButton.prototype.create = function() {
this.button = document.createElement('div');
this.button.className = 'psv-button psv-download-button';
this.button.title = this.psv.config.lang.download;

this.button.appendChild(document.createElement('div'));

Expand Down
1 change: 1 addition & 0 deletions src/PSVNavBarFullscreenButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ PSVNavBarFullscreenButton.prototype.constructor = PSVNavBarFullscreenButton;
PSVNavBarFullscreenButton.prototype.create = function() {
this.button = document.createElement('div');
this.button.className = 'psv-button psv-fullscreen-button';
this.button.title = this.psv.config.lang.fullscreen;

this.button.appendChild(document.createElement('div'));
this.button.appendChild(document.createElement('div'));
Expand Down
4 changes: 4 additions & 0 deletions src/PSVNavBarZoomButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ PSVNavBarZoomButton.prototype.create = function() {

var zoom_minus = document.createElement('div');
zoom_minus.className = 'psv-zoom-minus';
zoom_minus.title = this.psv.config.lang.zoomOut;
this.button.appendChild(zoom_minus);

var zoom_range_bg = document.createElement('div');
Expand All @@ -33,14 +34,17 @@ PSVNavBarZoomButton.prototype.create = function() {

this.zoom_range = document.createElement('div');
this.zoom_range.className = 'psv-zoom-range-line';
this.zoom_range.title = this.psv.config.lang.zoom;
zoom_range_bg.appendChild(this.zoom_range);

this.zoom_value = document.createElement('div');
this.zoom_value.className = 'psv-zoom-range-handle';
this.zoom_value.title = this.psv.config.lang.zoom;
this.zoom_range.appendChild(this.zoom_value);

var zoom_plus = document.createElement('div');
zoom_plus.className = 'psv-zoom-plus';
zoom_plus.title = this.psv.config.lang.zoomIn;
this.button.appendChild(zoom_plus);

PSVUtils.addEvent(this.zoom_range, 'mousedown', this._initZoomChangeWithMouse.bind(this));
Expand Down
8 changes: 8 additions & 0 deletions src/PhotoSphereViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ PhotoSphereViewer.DEFAULTS = {
anim_speed: '2rpm',
anim_lat: null,
navbar: false,
lang: {
autorotate: 'Automatic rotation',
zoom: 'Zoom',
zoomOut: 'Zoom out',
zoomIn: 'Zoom in',
download: 'Download',
fullscreen: 'Fullscreen'
},
mousewheel: true,
mousemove: true,
loading_img: null,
Expand Down

0 comments on commit 2d16df1

Please sign in to comment.