ldmarz / le-angular-gantt

Gantt chart component for high amount of data
MIT License
4 stars 1 forks source link

gantt-dependencies not working #37

Open OlegMalyutin opened 5 years ago

OlegMalyutin commented 5 years ago

If add tag <gantt-dependencies enabled="true" ></gantt-dependencies> got error

Crome error - TypeError: Cannot read property 'importDefaults' of undefined FF error TypeError: "this.plumb is undefined"

OlegMalyutin commented 5 years ago

angular-gantt use jsPlumb (https://github.com/jsplumb/jsplumb) which is have not clear MIT license

All 1.x.x and 2.x.x versions of jsPlumb Community edition are dual-licensed under both MIT and GPLv2.

and https://jsplumbtoolkit.com/purchase May be use another project for draw arrows?

ldmarz commented 5 years ago

Seems like an issue for me let me check

OlegMalyutin commented 5 years ago

Thank you for quick answer ! 👍

OlegMalyutin commented 5 years ago

Because jsPlumb have GPLv2 license, I am trying to create arrows like in jsPlumb (may be I will find ready draw arrow MIT license project) For start I am using this snippet: https://stackoverflow.com/questions/39685298/draw-a-line-between-2-divs-once-2-consequence-div-clicked-using-angularjs I have questions 1) Can you insert custom code for draw arrows in le-angular-gantt ? 2) Which API (functions) need for this insert ? 3) What will be better to use for draw Canvas Or SVG ?

OlegMalyutin commented 5 years ago

Look code by url. This is alfa version drow arrow https://my-files.ru/3zjh3w (green button for download)

ldmarz commented 5 years ago

This project originally uses jsPlumb to draw arrows dependencies but I commented those lines because some issue I got implementing the recycler view, so you can try to solve this issue and I'll be glad to merge your changes.

https://github.com/ldmarz/le-angular-gantt/blob/668e872f17bef9ab732444e4e57985ba1a4dc20e/src/plugins/dependencies/dependenciesManager.factory.ts#L18

OlegMalyutin commented 5 years ago

Ok. 2. Which API (functions) need for this insert ? Can you explain ? I am newbie in angularJs and for me it is very difficult understand big listing code.

OlegMalyutin commented 5 years ago

I can insert code in guntt.tmpl.html !-- Task template -- section for connect point in task, but I cant call function ng-click="selectAnswer(task.model.task[0].id)" defined in $scope variable in controller.

<script type="text/ng-template" id="template/ganttTask.tmpl.html">
    <div class="gantt-task" ng-class="getClass()">
        <gantt-task-background></gantt-task-background> 
        <gantt-task-foreground></gantt-task-foreground>
        <gantt-task-content></gantt-task-content>  
        <div  class="port round-pointer-begin" ng-click="selectAnswer(task.model.task[0].id)"> </div>
        <div  onclick="selectAnswer()" class="port round-pointer-end"> </div>
    </div>
</script>

task.model.task[0].id need for change task dependencies That's all for create first release draw arraw. Can you help?