diff options
author | Jonathan Duran | 2012-02-29 13:23:30 -0800 |
---|---|---|
committer | Jonathan Duran | 2012-02-29 13:23:30 -0800 |
commit | 59757653a5c49ac0db45c5d4f93e3493c1f08e44 (patch) | |
tree | 8193046c6b1dddaedfd59d954e862a734bfb0a93 /imports | |
parent | 681d55a9cdc4e790d9e1742dc13ce62e42b6a516 (diff) | |
download | ninja-59757653a5c49ac0db45c5d4f93e3493c1f08e44.tar.gz |
Squashed commit of the following:
commit 2b9f63089534356607ad7e0ddde6f22e42d04f80
Merge: 98d491f a89e30a
Author: Valerio Virgillito <valerio@motorola.com>
Date: Wed Feb 29 12:12:11 2012 -0800
Merge pull request #88 from mqg734/ToolFixes
Fix for performance issue when moving shapes.
commit 98d491f7e57ff5a9b091e332d7d1e81061e39efa
Merge: 052d980 d417b33
Author: Valerio Virgillito <valerio@motorola.com>
Date: Wed Feb 29 12:10:57 2012 -0800
Merge branch 'SnapManagerFixes' of https://github.com/mqg734/ninja-internal into integration-candidate
commit 052d9805a6f0a3a90d6849eb94eabffb7ec26962
Merge: 3d233f2 2f3e4d1
Author: Valerio Virgillito <valerio@motorola.com>
Date: Wed Feb 29 12:10:03 2012 -0800
Merge branch 'integration-candidate' of github.com:Motorola-Mobility/ninja-internal into integration-candidate
commit 3d233f25cff057fff5c5a75e4c4b40e88c22a8f5
Merge: 3dbe798 209e078
Author: Valerio Virgillito <valerio@motorola.com>
Date: Wed Feb 29 12:09:43 2012 -0800
Merge branch 'NiveshColor' of https://github.com/mqg734/ninja-internal into integration-candidate
commit 2f3e4d12aa15077d3cc9794862156e57b7815e68
Merge: 850f3a1 0996a51
Author: Valerio Virgillito <valerio@motorola.com>
Date: Wed Feb 29 12:06:21 2012 -0800
Merge pull request #87 from joseeight/FileIO-Build-Candidate
Fixes to preview caching issues
commit 850f3a1f7ab81ec80b6de1c49f2d2bbcbfe87c8e
Merge: 1568367 5f777eb
Author: Valerio Virgillito <valerio@motorola.com>
Date: Wed Feb 29 12:05:48 2012 -0800
Merge pull request #86 from imix23ways/Timeline
Timeline
commit 1568367213e760463f3ee29a531aa345fda6bd6d
Merge: 3dbe798 271a8f2
Author: Valerio Virgillito <valerio@motorola.com>
Date: Wed Feb 29 12:03:23 2012 -0800
Merge pull request #85 from pushkarjoshi/brushtool
Brushtool
commit a89e30ab834a48be32b6122e0c8ac1e0c3ed43e8
Author: Nivesh Rajbhandari <mqg734@motorola.com>
Date: Wed Feb 29 11:58:28 2012 -0800
Fix for performance issue when moving shapes. We don't need to call render except if the geometry and materials change.
This is more easy to see with shapes like the brush tool.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
commit 271a8f2b29d87d12c81d03e3f1e2c05b816a138d
Author: Pushkar Joshi <pushkar@motorola.com>
Date: Wed Feb 29 11:50:41 2012 -0800
prevent extremely long path rendering (temporary fix)
commit 0996a519afccbed526912807c70c20d598e9cae7
Merge: 98f1cfc 03d277d
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Wed Feb 29 11:46:59 2012 -0800
Merge branch 'refs/heads/FileIO' into FileIO-Build-Candidate
commit 03d277db80b6cea9a25320c0575ae2bf7a6d7e6e
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Wed Feb 29 11:46:44 2012 -0800
Preview Fix
Adding save all logic before preview, temporary fix.
commit 46fb52be241dced940d46629c809a09c86ed4438
Author: Pushkar Joshi <pushkar@motorola.com>
Date: Wed Feb 29 11:38:33 2012 -0800
changed the registration point of the brush tool icon and
added a temporary check to prevent extremely long brush strokes
commit 98f1cfc58f545702a18166ab216362d667c18915
Merge: da83f44 bb3e42b
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Wed Feb 29 11:29:09 2012 -0800
Merge branch 'refs/heads/FileIO' into FileIO-Build-Candidate
commit bb3e42b531848b400670df6caf0f3ce02adf1243
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Wed Feb 29 11:28:58 2012 -0800
Fix: Caching issue with chrome tab API
Using window.open to test movie.
commit f000a3cced9adbfff1d7aa641e6eb42ad6edf7e8
Author: Pushkar Joshi <pushkar@motorola.com>
Date: Wed Feb 29 10:21:06 2012 -0800
change in comment only
commit 795329d2225ff3b760f7f0ea3bb6b5e68f6c6b5b
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Wed Feb 29 10:07:53 2012 -0800
Making class level url template variable
Created a class level variable for the URL to be parsed out of the user files.
commit f931c48a7d0bcf1222cf05787e3294839ed0b9fb
Author: Pushkar Joshi <pushkar@motorola.com>
Date: Wed Feb 29 09:47:41 2012 -0800
resample the brush stroke so we don't have gaps if the path is drawn rapidly,
and,
allow to change the stroke color,
and,
more efficient stroke rendering by drawing translated radial gradients (instead of creating new gradients for each stroke sample)
commit d417b3315f1aa6dd52fea10cbf5f17a213ef8726
Author: Nivesh Rajbhandari <mqg734@motorola.com>
Date: Wed Feb 29 06:50:51 2012 -0800
SnapManager fixes for sag tags.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
commit 209e0781e926212bbaaad9e8ca4b61a0c389b30f
Author: Nivesh Rajbhandari <mqg734@motorola.com>
Date: Tue Feb 28 17:19:42 2012 -0800
We need to remove color buttons from the color model when updating the PI for selection change.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
commit b43efdcbfa671a46d1edaeb1555f508fe2ad0338
Merge: 16d6a90 f2ab699
Author: Pushkar Joshi <pushkar@motorola.com>
Date: Tue Feb 28 14:55:08 2012 -0800
Merge branch 'pentool' into brushtool
commit 16d6a90579cdafede931a9c818689fad2e622d8b
Merge: 03ca7a5 63307c9
Author: Pushkar Joshi <pushkar@motorola.com>
Date: Tue Feb 28 14:19:25 2012 -0800
Merge branch 'pentool' into brushtool
commit 03ca7a5ed13c25faaa9100bb666e062fd15335e6
Merge: fcb12cc 053fc63
Author: Pushkar Joshi <pushkar@motorola.com>
Date: Fri Feb 24 12:08:49 2012 -0800
Merge branch 'pentool' into brushtool
Conflicts:
imports/codemirror/mode/scheme/scheme.js
js/tools/BrushTool.js
commit fcb12cc09eb3cd3b42bd215877ba18f449275b75
Author: Pushkar Joshi <pushkar@motorola.com>
Date: Fri Feb 10 14:16:56 2012 -0800
render the brush stroke as a sequence of rectangles, with each rectangle having its own linear gradient
commit 6bb00e69713bd7131b2bc0a15e4e0cb6071d616c
Merge: 5f42bd1 666ae3e
Author: Pushkar Joshi <pushkar@motorola.com>
Date: Thu Feb 9 13:42:59 2012 -0800
Merge branch 'master' into brushtool
commit 5f42bd1f7723483d374cdd3fe51ef8298c86a1a2
Merge: abeb9f1 fba39db
Author: Pushkar Joshi <pushkar@motorola.com>
Date: Thu Feb 9 10:55:58 2012 -0800
Merge branch 'pentool' into brushtool
commit abeb9f1e23679200bb2f4a3ccbcebfb37645975c
Author: Pushkar Joshi <pushkar@motorola.com>
Date: Thu Feb 9 10:45:50 2012 -0800
first phase of simple resampling to prevent tiny segments
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'imports')
-rw-r--r--[-rwxr-xr-x] | imports/codemirror/mode/scheme/scheme.js | 402 |
1 files changed, 201 insertions, 201 deletions
diff --git a/imports/codemirror/mode/scheme/scheme.js b/imports/codemirror/mode/scheme/scheme.js index caf78db0..45ae1822 100755..100644 --- a/imports/codemirror/mode/scheme/scheme.js +++ b/imports/codemirror/mode/scheme/scheme.js | |||
@@ -1,202 +1,202 @@ | |||
1 | /** | 1 | /** |
2 | * Author: Koh Zi Han, based on implementation by Koh Zi Chun | 2 | * Author: Koh Zi Han, based on implementation by Koh Zi Chun |
3 | */ | 3 | */ |
4 | CodeMirror.defineMode("scheme", function (config, mode) { | 4 | CodeMirror.defineMode("scheme", function (config, mode) { |
5 | var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", | 5 | var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", |
6 | ATOM = "atom", NUMBER = "number", BRACKET = "bracket", KEYWORD="keyword"; | 6 | ATOM = "atom", NUMBER = "number", BRACKET = "bracket", KEYWORD="keyword"; |
7 | var INDENT_WORD_SKIP = 2, KEYWORDS_SKIP = 1; | 7 | var INDENT_WORD_SKIP = 2, KEYWORDS_SKIP = 1; |
8 | 8 | ||
9 | function makeKeywords(str) { | 9 | function makeKeywords(str) { |
10 | var obj = {}, words = str.split(" "); | 10 | var obj = {}, words = str.split(" "); |
11 | for (var i = 0; i < words.length; ++i) obj[words[i]] = true; | 11 | for (var i = 0; i < words.length; ++i) obj[words[i]] = true; |
12 | return obj; | 12 | return obj; |
13 | } | 13 | } |
14 | 14 | ||
15 | var keywords = makeKeywords("λ case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"); | 15 | var keywords = makeKeywords("λ case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"); |
16 | var indentKeys = makeKeywords("define let letrec let* lambda"); | 16 | var indentKeys = makeKeywords("define let letrec let* lambda"); |
17 | 17 | ||
18 | 18 | ||
19 | function stateStack(indent, type, prev) { // represents a state stack object | 19 | function stateStack(indent, type, prev) { // represents a state stack object |
20 | this.indent = indent; | 20 | this.indent = indent; |
21 | this.type = type; | 21 | this.type = type; |
22 | this.prev = prev; | 22 | this.prev = prev; |
23 | } | 23 | } |
24 | 24 | ||
25 | function pushStack(state, indent, type) { | 25 | function pushStack(state, indent, type) { |
26 | state.indentStack = new stateStack(indent, type, state.indentStack); | 26 | state.indentStack = new stateStack(indent, type, state.indentStack); |
27 | } | 27 | } |
28 | 28 | ||
29 | function popStack(state) { | 29 | function popStack(state) { |
30 | state.indentStack = state.indentStack.prev; | 30 | state.indentStack = state.indentStack.prev; |
31 | } | 31 | } |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * Scheme numbers are complicated unfortunately. | 34 | * Scheme numbers are complicated unfortunately. |
35 | * Checks if we're looking at a number, which might be possibly a fraction. | 35 | * Checks if we're looking at a number, which might be possibly a fraction. |
36 | * Also checks that it is not part of a longer identifier. Returns true/false accordingly. | 36 | * Also checks that it is not part of a longer identifier. Returns true/false accordingly. |
37 | */ | 37 | */ |
38 | function isNumber(ch, stream){ | 38 | function isNumber(ch, stream){ |
39 | if(/[0-9]/.exec(ch) != null){ | 39 | if(/[0-9]/.exec(ch) != null){ |
40 | stream.eatWhile(/[0-9]/); | 40 | stream.eatWhile(/[0-9]/); |
41 | stream.eat(/\//); | 41 | stream.eat(/\//); |
42 | stream.eatWhile(/[0-9]/); | 42 | stream.eatWhile(/[0-9]/); |
43 | if (stream.eol() || !(/[a-zA-Z\-\_\/]/.exec(stream.peek()))) return true; | 43 | if (stream.eol() || !(/[a-zA-Z\-\_\/]/.exec(stream.peek()))) return true; |
44 | stream.backUp(stream.current().length - 1); // undo all the eating | 44 | stream.backUp(stream.current().length - 1); // undo all the eating |
45 | } | 45 | } |
46 | return false; | 46 | return false; |
47 | } | 47 | } |
48 | 48 | ||
49 | return { | 49 | return { |
50 | startState: function () { | 50 | startState: function () { |
51 | return { | 51 | return { |
52 | indentStack: null, | 52 | indentStack: null, |
53 | indentation: 0, | 53 | indentation: 0, |
54 | mode: false, | 54 | mode: false, |
55 | sExprComment: false | 55 | sExprComment: false |
56 | }; | 56 | }; |
57 | }, | 57 | }, |
58 | 58 | ||
59 | token: function (stream, state) { | 59 | token: function (stream, state) { |
60 | if (state.indentStack == null && stream.sol()) { | 60 | if (state.indentStack == null && stream.sol()) { |
61 | // update indentation, but only if indentStack is empty | 61 | // update indentation, but only if indentStack is empty |
62 | state.indentation = stream.indentation(); | 62 | state.indentation = stream.indentation(); |
63 | } | 63 | } |
64 | 64 | ||
65 | // skip spaces | 65 | // skip spaces |
66 | if (stream.eatSpace()) { | 66 | if (stream.eatSpace()) { |
67 | return null; | 67 | return null; |
68 | } | 68 | } |
69 | var returnType = null; | 69 | var returnType = null; |
70 | 70 | ||
71 | switch(state.mode){ | 71 | switch(state.mode){ |
72 | case "string": // multi-line string parsing mode | 72 | case "string": // multi-line string parsing mode |
73 | var next, escaped = false; | 73 | var next, escaped = false; |
74 | while ((next = stream.next()) != null) { | 74 | while ((next = stream.next()) != null) { |
75 | if (next == "\"" && !escaped) { | 75 | if (next == "\"" && !escaped) { |
76 | 76 | ||
77 | state.mode = false; | 77 | state.mode = false; |
78 | break; | 78 | break; |
79 | } | 79 | } |
80 | escaped = !escaped && next == "\\"; | 80 | escaped = !escaped && next == "\\"; |
81 | } | 81 | } |
82 | returnType = STRING; // continue on in scheme-string mode | 82 | returnType = STRING; // continue on in scheme-string mode |
83 | break; | 83 | break; |
84 | case "comment": // comment parsing mode | 84 | case "comment": // comment parsing mode |
85 | var next, maybeEnd = false; | 85 | var next, maybeEnd = false; |
86 | while ((next = stream.next()) != null) { | 86 | while ((next = stream.next()) != null) { |
87 | if (next == "#" && maybeEnd) { | 87 | if (next == "#" && maybeEnd) { |
88 | 88 | ||
89 | state.mode = false; | 89 | state.mode = false; |
90 | break; | 90 | break; |
91 | } | 91 | } |
92 | maybeEnd = (next == "|"); | 92 | maybeEnd = (next == "|"); |
93 | } | 93 | } |
94 | returnType = COMMENT; | 94 | returnType = COMMENT; |
95 | break; | 95 | break; |
96 | case "s-expr-comment": // s-expr commenting mode | 96 | case "s-expr-comment": // s-expr commenting mode |
97 | state.mode = false; | 97 | state.mode = false; |
98 | if(stream.peek() == "(" || stream.peek() == "["){ | 98 | if(stream.peek() == "(" || stream.peek() == "["){ |
99 | // actually start scheme s-expr commenting mode | 99 | // actually start scheme s-expr commenting mode |
100 | state.sExprComment = 0; | 100 | state.sExprComment = 0; |
101 | }else{ | 101 | }else{ |
102 | // if not we just comment the entire of the next token | 102 | // if not we just comment the entire of the next token |
103 | stream.eatWhile(/[^/s]/); // eat non spaces | 103 | stream.eatWhile(/[^/s]/); // eat non spaces |
104 | returnType = COMMENT; | 104 | returnType = COMMENT; |
105 | break; | 105 | break; |
106 | } | 106 | } |
107 | default: // default parsing mode | 107 | default: // default parsing mode |
108 | var ch = stream.next(); |