Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toSide/toText properties are missing in data parameter of dependencyValidationStart event #872

Open
pmiklashevych opened this issue Jun 2, 2020 · 0 comments
Labels
bug Something isn't working forum Issues from forum

Comments

@pmiklashevych
Copy link

pmiklashevych commented Jun 2, 2020

https://www.bryntum.com/forum/viewtopic.php?f=44&t=14226

As a workaround user can take it from target/targetTerminal:

const scheduler = new Scheduler({
    listeners : {
        dependencyValidationStart({ data }) {
            console.log(data.toSide, data.toText); // empty string
            console.log(data.target.name, data.targetTerminal.dataset.side);
        }
    },

toSide/toText are set too late, see Scheduler/lib/Scheduler/feature/mixin/DependencyCreation.js

            getHtml        : ({ tip, event }) => {
                if (me.creationData) {
// onOverTargetTerminal fires 'dependencyValidationStart'
                    event && me.onOverTargetTerminal(event);
// generateTooltipContent adds toSide/toText info
                    return me.generateTooltipContent(tip, me.creationData);
                }
            },

Also maybe need to describe details of 'data' in https://www.bryntum.com/docs/scheduler/#Scheduler/feature/mixin/DependencyCreation#event-dependencyValidationStart

And maybe add toSide/toText to the
https://www.bryntum.com/docs/scheduler/#Scheduler/data/DependencyStore#function-isValidDependencyToCreate

@pmiklashevych pmiklashevych added bug Something isn't working forum Issues from forum labels Jun 2, 2020
@pmiklashevych pmiklashevych changed the title In dependencyValidationStart listener in data parameter toSide/toText properties are missing toSide/toText properties are missing in data parameter of dependencyValidationStart event Jun 2, 2020
@isglass isglass added this to the Scheduler 3.1.x milestone Jun 2, 2020
@isglass isglass modified the milestones: Scheduler 3.1.x, Scheduler 4.x.x Aug 13, 2020
@isglass isglass modified the milestones: Scheduler 4.x.x, 4.x.x Nov 18, 2020
@matsbryntse matsbryntse removed this from the 4.x.x milestone Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum
Projects
None yet
Development

No branches or pull requests

3 participants