@xeokit/xeokit-sdk 2.4.0-alpha-17 → 2.4.0-alpha-18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/xeokit-sdk.cjs.js
CHANGED
|
@@ -11497,6 +11497,9 @@ class Annotation extends Marker {
|
|
|
11497
11497
|
this._marker.addEventListener("mouseleave", () => {
|
|
11498
11498
|
this.plugin.fire("markerMouseLeave", this);
|
|
11499
11499
|
});
|
|
11500
|
+
this._marker.addEventListener('wheel', (event) => {
|
|
11501
|
+
this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent('wheel', event));
|
|
11502
|
+
});
|
|
11500
11503
|
}
|
|
11501
11504
|
if (!this._labelExternal) {
|
|
11502
11505
|
if (this._label) {
|
|
@@ -11512,6 +11515,9 @@ class Annotation extends Marker {
|
|
|
11512
11515
|
this._label = labelFragment.firstChild;
|
|
11513
11516
|
this._container.appendChild(this._label);
|
|
11514
11517
|
this._label.style.visibility = (this._markerShown && this._labelShown) ? "visible" : "hidden";
|
|
11518
|
+
this._label.addEventListener('wheel', (event) => {
|
|
11519
|
+
this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent('wheel', event));
|
|
11520
|
+
});
|
|
11515
11521
|
}
|
|
11516
11522
|
}
|
|
11517
11523
|
|
package/dist/xeokit-sdk.es.js
CHANGED
|
@@ -11493,6 +11493,9 @@ class Annotation extends Marker {
|
|
|
11493
11493
|
this._marker.addEventListener("mouseleave", () => {
|
|
11494
11494
|
this.plugin.fire("markerMouseLeave", this);
|
|
11495
11495
|
});
|
|
11496
|
+
this._marker.addEventListener('wheel', (event) => {
|
|
11497
|
+
this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent('wheel', event));
|
|
11498
|
+
});
|
|
11496
11499
|
}
|
|
11497
11500
|
if (!this._labelExternal) {
|
|
11498
11501
|
if (this._label) {
|
|
@@ -11508,6 +11511,9 @@ class Annotation extends Marker {
|
|
|
11508
11511
|
this._label = labelFragment.firstChild;
|
|
11509
11512
|
this._container.appendChild(this._label);
|
|
11510
11513
|
this._label.style.visibility = (this._markerShown && this._labelShown) ? "visible" : "hidden";
|
|
11514
|
+
this._label.addEventListener('wheel', (event) => {
|
|
11515
|
+
this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent('wheel', event));
|
|
11516
|
+
});
|
|
11511
11517
|
}
|
|
11512
11518
|
}
|
|
11513
11519
|
|
package/dist/xeokit-sdk.es5.js
CHANGED
|
@@ -2859,8 +2859,8 @@ _this13._currentAngleMeasurement.targetVisible=true;_this13._currentAngleMeasure
|
|
|
2859
2859
|
*/_this16.projection=cfg.projection;return _this16;}/**
|
|
2860
2860
|
* @private
|
|
2861
2861
|
*/_createClass(Annotation,[{key:"_buildHTML",value:function _buildHTML(){var _this17=this;if(!this._markerExternal){if(this._marker){this._container.removeChild(this._marker);this._marker=null;}var markerHTML=this._markerHTML||"<p></p>";// Make marker
|
|
2862
|
-
if(utils.isArray(markerHTML)){markerHTML=markerHTML.join("");}markerHTML=this._renderTemplate(markerHTML);var markerFragment=document.createRange().createContextualFragment(markerHTML);this._marker=markerFragment.firstChild;this._container.appendChild(this._marker);this._marker.style.visibility=this._markerShown?"visible":"hidden";this._marker.addEventListener("click",function(){_this17.plugin.fire("markerClicked",_this17);});this._marker.addEventListener("mouseenter",function(){_this17.plugin.fire("markerMouseEnter",_this17);});this._marker.addEventListener("mouseleave",function(){_this17.plugin.fire("markerMouseLeave",_this17);});}if(!this._labelExternal){if(this._label){this._container.removeChild(this._label);this._label=null;}var labelHTML=this._labelHTML||"<p></p>";// Make label
|
|
2863
|
-
if(utils.isArray(labelHTML)){labelHTML=labelHTML.join("");}labelHTML=this._renderTemplate(labelHTML);var labelFragment=document.createRange().createContextualFragment(labelHTML);this._label=labelFragment.firstChild;this._container.appendChild(this._label);this._label.style.visibility=this._markerShown&&this._labelShown?"visible":"hidden";}}/**
|
|
2862
|
+
if(utils.isArray(markerHTML)){markerHTML=markerHTML.join("");}markerHTML=this._renderTemplate(markerHTML);var markerFragment=document.createRange().createContextualFragment(markerHTML);this._marker=markerFragment.firstChild;this._container.appendChild(this._marker);this._marker.style.visibility=this._markerShown?"visible":"hidden";this._marker.addEventListener("click",function(){_this17.plugin.fire("markerClicked",_this17);});this._marker.addEventListener("mouseenter",function(){_this17.plugin.fire("markerMouseEnter",_this17);});this._marker.addEventListener("mouseleave",function(){_this17.plugin.fire("markerMouseLeave",_this17);});this._marker.addEventListener('wheel',function(event){_this17.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent('wheel',event));});}if(!this._labelExternal){if(this._label){this._container.removeChild(this._label);this._label=null;}var labelHTML=this._labelHTML||"<p></p>";// Make label
|
|
2863
|
+
if(utils.isArray(labelHTML)){labelHTML=labelHTML.join("");}labelHTML=this._renderTemplate(labelHTML);var labelFragment=document.createRange().createContextualFragment(labelHTML);this._label=labelFragment.firstChild;this._container.appendChild(this._label);this._label.style.visibility=this._markerShown&&this._labelShown?"visible":"hidden";this._label.addEventListener('wheel',function(event){_this17.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent('wheel',event));});}}/**
|
|
2864
2864
|
* @private
|
|
2865
2865
|
*/},{key:"_updatePosition",value:function _updatePosition(){var boundary=this.scene.canvas.boundary;var left=boundary[0];var top=boundary[1];var canvasPos=this.canvasPos;this._marker.style.left=Math.floor(left+canvasPos[0])-12+"px";this._marker.style.top=Math.floor(top+canvasPos[1])-12+"px";this._marker.style["z-index"]=90005+Math.floor(this._viewPos[2])+1;var offsetX=20;var offsetY=-17;this._label.style.left=20+Math.floor(left+canvasPos[0]+offsetX)+"px";this._label.style.top=Math.floor(top+canvasPos[1]+offsetY)+"px";this._label.style["z-index"]=90005+Math.floor(this._viewPos[2])+1;}/**
|
|
2866
2866
|
* @private
|