Closed Shadowstep33 closed 8 years ago
Im not involved but I can look :) You use my patch for interaction, right?
correct @Ivan thanks!
A precursory glance suggests
export function getAbsPos(obj, from = null) {
//if (EZGUI.Compatibility.PIXIVersion == 3) {
if (from == null) from = { x: 0, y: 0 };
from.x += obj.position.x;
from.y += obj.position.y;
if (obj.parent != null) return getAbsPos(obj.parent, from);
return from;
//}
//else {
//return { x: obj.worldTransform.tx, y: obj.worldTransform.ty };
//}
}
var from as "undefined" is not being handled; maybe InteractionPatch needs to pass from as null?
\ Or maybe I'm just dumb and passing an undefined var will trigger from = null
Possible additional info: Interaction such as mouseup still works on the second menu. I don't have a mouseup trigger on the first menu's buttons, so it could be just drag is getting broken an mouseup still works.
I have an idea: If you are using toLocal() or toGlobal() in object and it fails somewhere (please look at other errors), then root element will have incorrect parent, "_tempDisplayObjectParent" which has no position at all. May be actually adding some temporary (0,0) position to _tempDisplayObjectParent will help :)
Look at https://github.com/pixijs/pixi.js/blob/master/src/core/display/DisplayObject.js , please
Try adding some "position : {x:0, y:0}" in that variables in your version of pixi.js. If it works then we have succeeded, but we have to find why the heck temp variable is used there.
Seems to have worked my man :) Thanks!
Can you also test latest version of PIXI? I believe that they had fixed that.
Hi, I have a feeling something about one of my more recent menus is affecting the previous ones. First off, here is the stack trace:
My first menu (the one where dragging on the list buttons) goes something like this:
The Menu that seems to be the offending problem:
I use the same way of adding handlers post-facto:
Although obviously, the components getting iterated is specific to the menu. Now, perhaps @ivanpopelyshev can shed some light as to why InteractionPatch is throwing these errors. I'm not sure if he is involved with the development of this library or not. When I don't run the code for the second menu, everything works as expected. I am going to look into this myself as well but figured I'd put this here for anyone else to take a look at also.