Yes, I checked but other than bodyconstructor, the only thing on the window is that I have a context menu (which I think canvases support also).
As a side note, when doing eventwindowpooling it would be great if there is a more expressive api/function to implement so that a window knows for which event it is being re-used. Currently I override the setProperties to capture the re-use happening.
Also, I looked at the _getNewEventWindow function (can't stop myself) some more and if I have renderEventsOnDemand on true event window pooling automatically happens it seems, see the else, which always adds the eventwindow to the pool, and the if before that which uses it when renderEventsOnDemand==true. Also the if does not check on _availableForUse (if it is for a different event).
Code:
var canvasPool = view._eventCanvasPool,
canvas // = view.getCurrentEventCanvas(event),
;
// there's a current event window, or we're recycling them and we have one available...
if (canvas || (this.renderEventsOnDemand && canvasPool[eventIndex])) {
if (canvas) {
var existingWinIndex = canvasPool.indexOf(canvas);
if (existingWinIndex != eventIndex) {
var moveThisWin = canvasPool[eventIndex];
canvasPool[eventIndex] = canvas;
canvasPool[existingWinIndex] = moveThisWin;
}
} else {
// ...reclaim the event from the event bin
canvas = canvasPool[eventIndex];
canvas.event = event;
canvas.VSnapOrigin = 0;
reclaimed = true;
canvas.setStyleName(event[this.eventWindowStyleField] || this.eventWindowStyle);
}
canvas.setProperties(props);
} else {
// create eventWindow as an autoChild so it can be customized.
canvas = this.createAutoChild("eventWindow", props, this.eventCanvasConstructor);
view._eventCanvasPool.add(canvas);
}
Leave a comment: