You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mo...@apache.org on 2016/08/06 15:20:21 UTC
zeppelin git commit: [ ZEPPELIN-1296 Optimization ] optimize to
Paragraph move logic
Repository: zeppelin
Updated Branches:
refs/heads/master ea76ca9f3 -> e2dcbfa89
[ ZEPPELIN-1296 Optimization ] optimize to Paragraph move logic
### What is this PR for?
optimize to Paragraph move logic
The problem is slowness of movement for the paragraph - paragraph.
I've optimized it.
### What type of PR is it?
Improvement
### Jira issue
https://issues.apache.org/jira/browse/ZEPPELIN-1296
### Todos
* [x] - when pargaraph move then pass to digest loop.
### How should this be tested?
1. create to many paragarph.
2. first or last row in pargarph.
3. on keypress to 'up' and down.
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: CloverHearts <cl...@gmail.com>
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
Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/e2dcbfa8
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/e2dcbfa8
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/e2dcbfa8
Branch: refs/heads/master
Commit: e2dcbfa8970760b1778646bfa9fb8b4532d07cb3
Parents: ea76ca9
Author: CloverHearts <cl...@gmail.com>
Authored: Fri Aug 5 17:08:45 2016 +0900
Committer: Lee moon soo <mo...@apache.org>
Committed: Sat Aug 6 08:20:12 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/e2dcbfa8/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 2925c47..9322351 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
@@ -622,13 +622,15 @@ angular.module('zeppelinWebApp').controller('ParagraphCtrl', function($scope, $r
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() {
@@ -2383,7 +2385,8 @@ angular.module('zeppelinWebApp').controller('ParagraphCtrl', function($scope, $r
$scope.handleFocus(true);
} else {
$scope.editor.blur();
- $scope.handleFocus(false);
+ var isDigestPass = true;
+ $scope.handleFocus(false, isDigestPass);
}
});