Repository: zeppelin Updated Branches: refs/heads/branch-0.6 fa9f88df6 -> 72581f35e
[ ZEPPELIN-1296 Optimization ] optimize to Paragraph move logic optimize to Paragraph move logic The problem is slowness of movement for the paragraph - paragraph. I've optimized it. Improvement https://issues.apache.org/jira/browse/ZEPPELIN-1296 * [x] - when pargaraph move then pass to digest loop. 1. create to many paragarph. 2. first or last row in pargarph. 3. on keypress to 'up' and down.  * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: CloverHearts <[email protected]> Closes #1289 from cloverhearts/dev/paragraphMoveUpDownPerformanceUp and squashes the following commits: 8379a53 [CloverHearts] remove white space between function () 7ec8e98 [CloverHearts] optimize to Paragraph move logic (cherry picked from commit e2dcbfa8970760b1778646bfa9fb8b4532d07cb3) Signed-off-by: Lee moon soo <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/72581f35 Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/72581f35 Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/72581f35 Branch: refs/heads/branch-0.6 Commit: 72581f35e1fa039c63b19e7f9f7139a8eb552ff2 Parents: fa9f88d Author: CloverHearts <[email protected]> Authored: Fri Aug 5 17:08:45 2016 +0900 Committer: Lee moon soo <[email protected]> Committed: Sat Aug 6 08:32:55 2016 -0700 ---------------------------------------------------------------------- .../app/notebook/paragraph/paragraph.controller.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/72581f35/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js ---------------------------------------------------------------------- diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js index d8fc477..3560ba2 100644 --- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js +++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js @@ -809,13 +809,15 @@ angular.module('zeppelinWebApp') enableLiveAutocompletion:false }); - $scope.handleFocus = function(value) { + $scope.handleFocus = function(value, isDigestPass) { $scope.paragraphFocused = value; - // Protect against error in case digest is already running - $timeout(function() { - // Apply changes since they come from 3rd party library - $scope.$digest(); - }); + if (isDigestPass === false || isDigestPass === undefined) { + // Protect against error in case digest is already running + $timeout(function() { + // Apply changes since they come from 3rd party library + $scope.$digest(); + }); + } }; $scope.editor.on('focus', function() { @@ -1100,7 +1102,8 @@ angular.module('zeppelinWebApp') $scope.handleFocus(true); } else { $scope.editor.blur(); - $scope.handleFocus(false); + var isDigestPass = true; + $scope.handleFocus(false, isDigestPass); } });
