Skip to content

Commit

Permalink
bug fix: hotspot not showing up
Browse files Browse the repository at this point in the history
  • Loading branch information
weddingdj committed May 1, 2018
1 parent ec7651f commit 0e6b01a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions js/isvr-hotspot-text-listener.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ AFRAME.registerComponent('isvr-hotspot-text-listener', {
document.querySelector('#photosphere-menu').getAttribute('visible') == false) {

this.setAttribute('visible', false);
this.setAttribute('position', {x:0, y:10, z:-2.1});

var hotspot_text = document.querySelectorAll('.hotspot-text');
for (var i = 0; i < hotspot_text.length; i++) {
Expand Down
1 change: 1 addition & 0 deletions js/isvr-hotspot-wrapper-listener.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ AFRAME.registerComponent('isvr-hotspot-wrapper-listener', {

this.setAttribute('visible', false);

document.querySelector('.hotspot-text-content-id-' + this.getAttribute('data-text-content-id')).setAttribute('position', {x:0, y:1.6, z:-2.1});
document.querySelector('.hotspot-text-content-id-' + this.getAttribute('data-text-content-id')).setAttribute('visible', true);
}
});
Expand Down
2 changes: 1 addition & 1 deletion views/partials/hotspot_text_box_partial.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
isvr-hotspot-text-listener
class="collidable hotspot-text hotspot-text-content-id-{{ $annotation['#content-id'] . $rand }}"
visible="false"
position="0 1.6 -2.1"
position="0 10 -2.1"
rotation="0 0 0"
geometry="primitive: plane; width: 1.8; height: 0.66"
material="color: #FFFFFF; transparent: true; opacity: 0.5">
Expand Down
2 changes: 1 addition & 1 deletion views/scene.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class="collidable"
<a-entity
rotation="{{ $annotation['#rotation']['#x'] }} {{ $annotation['#rotation']['#y'] }} {{ $annotation['#rotation']['#z'] }}">
<a-circle
class="hotspot hotspot-content-id-{{ $photosphere['attach-annotations']['#content-id'] }}"
class="collidable hotspot hotspot-content-id-{{ $photosphere['attach-annotations']['#content-id'] }}"
data-content-id="{{ $photosphere['attach-annotations']['#content-id'] }}"
data-text-content-id="{{ $annotation['#content-id'] . $rand }}"
isvr-hotspot-wrapper-listener
Expand Down

0 comments on commit 0e6b01a

Please sign in to comment.