Ninety Proof Mezcal

    @ovh-ux/ng-ovh-jsplumb

    6.0.1 • Public • Published

    ng-ovh-jsplumb

    Allow to draw links between elements using jsplumb toolkit.

    npm version Downloads Dependencies Dev Dependencies Gitter

    Install

    $ yarn add @ovh-ux/ng-ovh-jsplumb

    Usage

    import angular from 'angular';
    import ngOvhJsplumb from '@ovh-ux/ng-ovh-jsplumb';
    
    angular.module('myApp', [ngOvhJsplumb]);

    For jQuery UI, we only need draggable and droppable functionalities (and the few core functionalities). So we can load only these files.

    Example

    First, make sure jsplumb is ready by calling jsPlumbService.jsplumbInit method:

    import angular from 'angular';
    
    angular.module('myApp').controller(
      'MyController',
      class {
        /* @ngInject */
        constructor($scope, jsPlumbService) {
          this.$scope = $scope;
          this.jsPlumbService = jsPlumbService;
        }
    
        $onInit() {
          this.$scope.jsplumbReady = false;
    
          this.jsPlumbService.jsplumbInit().finally(() => {
            this.$scope.jsplumbReady = true;
          });
        }
      },
    );

    Create an instance of ng-ovh-jsplumb with the jsplumbInstance directive:

    <div
        data-ng-if="jsplumbReady"
        data-jsplumb-instance></div>

    Related

    Test

    $ yarn test

    Contributing

    Always feel free to help out! Whether it's filing bugs and feature requests or working on some of the open issues, our contributing guide will help get you started.

    License

    BSD-3-Clause © OVH SAS

    Install

    npm i @ovh-ux/ng-ovh-jsplumb

    DownloadsWeekly Downloads

    6

    Version

    6.0.1

    License

    BSD-3-Clause

    Unpacked Size

    882 kB

    Total Files

    14

    Last publish

    Collaborators

    • jisay
    • blary_jp
    • antleblanc
    • cbourgois
    • ovh-ux-cds
    • lizardk
    • ovh
    • marie-j