You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by mcgilman <gi...@git.apache.org> on 2018/02/14 20:09:34 UTC

[GitHub] nifi pull request #2471: NIFI-3502: Upgrading D3 version

GitHub user mcgilman opened a pull request:

    https://github.com/apache/nifi/pull/2471

    NIFI-3502: Upgrading D3 version

    NIFI-3502:
    - Upgrading to D3 version 4.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mcgilman/nifi NIFI-3502

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/2471.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2471
    
----
commit ab9b778fc4095c49996e9ccf12d9ad3e244eca49
Author: Matt Gilman <ma...@...>
Date:   2018-02-07T13:36:34Z

    NIFI-3502:
    - Upgrading to D3 version 4.

----


---

[GitHub] nifi issue #2471: NIFI-3502: Upgrading D3 version

Posted by mcgilman <gi...@git.apache.org>.
Github user mcgilman commented on the issue:

    https://github.com/apache/nifi/pull/2471
  
    Just pushed a new commit that addresses @andrewmlim findings.


---

[GitHub] nifi pull request #2471: NIFI-3502: Upgrading D3 version

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi/pull/2471


---

[GitHub] nifi issue #2471: NIFI-3502: Upgrading D3 version

Posted by andrewmlim <gi...@git.apache.org>.
Github user andrewmlim commented on the issue:

    https://github.com/apache/nifi/pull/2471
  
    Started to test this out.  One thing I am noticing that is different from 1.5.0 is that if I select multiple processors, then deselect everything, the operate palette still says "Multiple components selected" for a couple seconds before it eventually clears


---

[GitHub] nifi pull request #2471: NIFI-3502: Upgrading D3 version

Posted by scottyaslan <gi...@git.apache.org>.
Github user scottyaslan commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2471#discussion_r169393440
  
    --- Diff: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js ---
    @@ -996,34 +1030,42 @@
                                     zoomed = true;
                                 }
     
    -                            // see if the scale has changed during this zoom event,
    -                            // we want to only transition when zooming in/out as running
    -                            // the transitions during pan events is
    -                            var transition = d3.event.sourceEvent.type === 'wheel' || d3.event.sourceEvent.type === 'mousewheel';
    -
                                 // refresh the canvas
                                 refreshed = nfCanvas.View.refresh({
                                     persist: false,
    -                                transition: transition,
    +                                transition: shouldTransition(d3.event.sourceEvent),
                                     refreshComponents: false,
                                     refreshBirdseye: false
                                 });
                             })
    -                        .on('zoomend', function () {
    -                            // ensure the canvas was actually refreshed
    -                            if (nfCommon.isDefinedAndNotNull(refreshed)) {
    -                                nfGraph.updateVisibility();
    -
    -                                // refresh the birdseye
    -                                refreshed.done(function () {
    -                                    nfBirdseye.refresh();
    -                                });
    +                        .on('end', function () {
    +                            if (!isBirdseyeEvent(d3.event.sourceEvent)) {
    +                                // ensure the canvas was actually refreshed
    +                                if (nfCommon.isDefinedAndNotNull(refreshed)) {
    +                                    nfGraph.updateVisibility();
    +
    +                                    // refresh the birdseye
    +                                    refreshed.done(function () {
    +                                        nfBirdseye.refresh();
    +                                    });
     
    -                                // persist the users view
    -                                nfCanvasUtils.persistUserView();
    +                                    // persist the users view
    +                                    nfCanvasUtils.persistUserView();
     
    -                                // reset the refreshed deferred
    -                                refreshed = null;
    +                                    // reset the refreshed deferred
    +                                    refreshed = null;
    +                                }
    +
    +                                if (panning === false) {
    +                                    // deselect as necessary if we are not panning
    +                                    nfCanvasUtils.getSelection().classed('selected', false);
    +
    +                                    // update URL deep linking params
    +                                    nfCanvasUtils.setURLParameters();
    +
    +                                    // inform Angular app values have changed
    +                                    nfNgBridge.digest();
    --- End diff --
    
    This is unnecessary...


---

[GitHub] nifi issue #2471: NIFI-3502: Upgrading D3 version

Posted by scottyaslan <gi...@git.apache.org>.
Github user scottyaslan commented on the issue:

    https://github.com/apache/nifi/pull/2471
  
    Will review...


---

[GitHub] nifi issue #2471: NIFI-3502: Upgrading D3 version

Posted by andrewmlim <gi...@git.apache.org>.
Github user andrewmlim commented on the issue:

    https://github.com/apache/nifi/pull/2471
  
    Upon further testing, it is really any selection and deselection where this issue occurs.  The previously selected component lingers in the Operate palette even when not selected.


---

[GitHub] nifi pull request #2471: NIFI-3502: Upgrading D3 version

Posted by mcgilman <gi...@git.apache.org>.
Github user mcgilman commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2471#discussion_r169394276
  
    --- Diff: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js ---
    @@ -996,34 +1030,42 @@
                                     zoomed = true;
                                 }
     
    -                            // see if the scale has changed during this zoom event,
    -                            // we want to only transition when zooming in/out as running
    -                            // the transitions during pan events is
    -                            var transition = d3.event.sourceEvent.type === 'wheel' || d3.event.sourceEvent.type === 'mousewheel';
    -
                                 // refresh the canvas
                                 refreshed = nfCanvas.View.refresh({
                                     persist: false,
    -                                transition: transition,
    +                                transition: shouldTransition(d3.event.sourceEvent),
                                     refreshComponents: false,
                                     refreshBirdseye: false
                                 });
                             })
    -                        .on('zoomend', function () {
    -                            // ensure the canvas was actually refreshed
    -                            if (nfCommon.isDefinedAndNotNull(refreshed)) {
    -                                nfGraph.updateVisibility();
    -
    -                                // refresh the birdseye
    -                                refreshed.done(function () {
    -                                    nfBirdseye.refresh();
    -                                });
    +                        .on('end', function () {
    +                            if (!isBirdseyeEvent(d3.event.sourceEvent)) {
    +                                // ensure the canvas was actually refreshed
    +                                if (nfCommon.isDefinedAndNotNull(refreshed)) {
    +                                    nfGraph.updateVisibility();
    +
    +                                    // refresh the birdseye
    +                                    refreshed.done(function () {
    +                                        nfBirdseye.refresh();
    +                                    });
     
    -                                // persist the users view
    -                                nfCanvasUtils.persistUserView();
    +                                    // persist the users view
    +                                    nfCanvasUtils.persistUserView();
     
    -                                // reset the refreshed deferred
    -                                refreshed = null;
    +                                    // reset the refreshed deferred
    +                                    refreshed = null;
    +                                }
    +
    +                                if (panning === false) {
    +                                    // deselect as necessary if we are not panning
    +                                    nfCanvasUtils.getSelection().classed('selected', false);
    +
    +                                    // update URL deep linking params
    +                                    nfCanvasUtils.setURLParameters();
    +
    +                                    // inform Angular app values have changed
    +                                    nfNgBridge.digest();
    --- End diff --
    
    Which part? The .digest() was necessary to address @andrewmlim comments.


---

[GitHub] nifi issue #2471: NIFI-3502: Upgrading D3 version

Posted by scottyaslan <gi...@git.apache.org>.
Github user scottyaslan commented on the issue:

    https://github.com/apache/nifi/pull/2471
  
    Thanks @mcgilman this has been merged to master.


---