I see docs has "onAlignTargetOutOfView" api,
https://www.bryntum.com/docs/taskboard/api/Core/widget/Widget#function-onAlignTargetOutOfView
It's internal,can I use it?how to use it?
Support Forum
Hey yingtao,
You can try to add the IntersectionObserver when the task is rendered. Like this
listeners : {
renderTask : ({ element, taskRecord }) => {
const callback = (entries) => {
const [entry] = entries;
console.log('taskRecord', taskRecord);
console.log('entry', entry);
};
const options = {
root : null,
rootMargin : '0px',
threshold : 0.1
};
const observer = new IntersectionObserver(callback, options);
observer.observe(element);
}
}
https://www.bryntum.com/docs/taskboard/api/Core/mixin/Events#config-listeners
https://www.bryntum.com/docs/taskboard/api/TaskBoard/view/mixin/TaskBoardDomEvents#event-renderTask
Best regards,
Márcio
I'm afraid is not possible because it's how the renderTask works, as it says in the documentation
This happens on initial render, when a task is added or when the task element is updated.
Perhaps you could use the isRefresh parameter to only add the IntersectionObserver when the variable is false (it means that the task was added).
Best regards,
Márcio