Explorar o código

Merge pull request #9766 from RaananW/fixViewer

Fix viewer callback binding
David Catuhe %!s(int64=4) %!d(string=hai) anos
pai
achega
607fce316f

+ 1 - 1
Viewer/src/templating/templateManager.ts

@@ -596,7 +596,7 @@ export class Template {
                             selector = this.parent.tagName;
                             selector = this.parent.tagName;
                         }
                         }
                         let binding = functionToFire.bind(this, selector);
                         let binding = functionToFire.bind(this, selector);
-                        this.parent.addEventListener(eventName, functionToFire.bind(this, selector), false);
+                        this.parent.addEventListener(eventName, binding, false);
                         this._registeredEvents.push({
                         this._registeredEvents.push({
                             htmlElement: this.parent,
                             htmlElement: this.parent,
                             eventName: eventName,
                             eventName: eventName,

+ 4 - 0
dist/preview release/what's new.md

@@ -70,6 +70,10 @@
 - Added image tracking feature ([RaananW](https://github.com/RaananW))
 - Added image tracking feature ([RaananW](https://github.com/RaananW))
 - Pointer Events of WebXR controllers have pointerType `xr` ([RaananW](https://github.com/RaananW))
 - Pointer Events of WebXR controllers have pointerType `xr` ([RaananW](https://github.com/RaananW))
 
 
+### Viewer
+
+- Fixed an issue with dual callback binding in case of a forced redraw ([#9608](https://github.com/BabylonJS/Babylon.js/issues/9608)) ([RaananW](https://github.com/RaananW))
+
 ## Bugs
 ## Bugs
 
 
 - Fix issue with the Promise polyfill where a return value was expected from resolve() ([Deltakosh](https://github.com/deltakosh))
 - Fix issue with the Promise polyfill where a return value was expected from resolve() ([Deltakosh](https://github.com/deltakosh))