Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ardublockly
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ardublockly
Commits
34914674
Commit
34914674
authored
Sep 29, 2015
by
Neil Fraser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dependency on goog.cssom.
parent
fbab0608
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
38 deletions
+16
-38
blockly_compressed.js
blockly_compressed.js
+3
-10
blockly_uncompressed.js
blockly_uncompressed.js
+1
-2
core/blockly.js
core/blockly.js
+0
-3
core/blocks.js
core/blocks.js
+2
-7
core/css.js
core/css.js
+9
-16
core/msg.js
core/msg.js
+1
-0
No files found.
blockly_compressed.js
View file @
34914674
This diff is collapsed.
Click to expand it.
blockly_uncompressed.js
View file @
34914674
...
@@ -33,7 +33,7 @@ goog.addDependency("../../../" + dir + "/core/bubble.js", ['Blockly.Bubble'], ['
...
@@ -33,7 +33,7 @@ goog.addDependency("../../../" + dir + "/core/bubble.js", ['Blockly.Bubble'], ['
goog
.
addDependency
(
"
../../../
"
+
dir
+
"
/core/comment.js
"
,
[
'
Blockly.Comment
'
],
[
'
Blockly.Bubble
'
,
'
Blockly.Icon
'
,
'
goog.userAgent
'
]);
goog
.
addDependency
(
"
../../../
"
+
dir
+
"
/core/comment.js
"
,
[
'
Blockly.Comment
'
],
[
'
Blockly.Bubble
'
,
'
Blockly.Icon
'
,
'
goog.userAgent
'
]);
goog
.
addDependency
(
"
../../../
"
+
dir
+
"
/core/connection.js
"
,
[
'
Blockly.Connection
'
,
'
Blockly.ConnectionDB
'
],
[
'
goog.dom
'
]);
goog
.
addDependency
(
"
../../../
"
+
dir
+
"
/core/connection.js
"
,
[
'
Blockly.Connection
'
,
'
Blockly.ConnectionDB
'
],
[
'
goog.dom
'
]);
goog
.
addDependency
(
"
../../../
"
+
dir
+
"
/core/contextmenu.js
"
,
[
'
Blockly.ContextMenu
'
],
[
'
goog.dom
'
,
'
goog.events
'
,
'
goog.style
'
,
'
goog.ui.Menu
'
,
'
goog.ui.MenuItem
'
]);
goog
.
addDependency
(
"
../../../
"
+
dir
+
"
/core/contextmenu.js
"
,
[
'
Blockly.ContextMenu
'
],
[
'
goog.dom
'
,
'
goog.events
'
,
'
goog.style
'
,
'
goog.ui.Menu
'
,
'
goog.ui.MenuItem
'
]);
goog
.
addDependency
(
"
../../../
"
+
dir
+
"
/core/css.js
"
,
[
'
Blockly.Css
'
],
[
'
goog.cssom
'
]);
goog
.
addDependency
(
"
../../../
"
+
dir
+
"
/core/css.js
"
,
[
'
Blockly.Css
'
],
[]);
goog
.
addDependency
(
"
../../../
"
+
dir
+
"
/core/field.js
"
,
[
'
Blockly.Field
'
],
[
'
goog.asserts
'
,
'
goog.dom
'
,
'
goog.math.Size
'
,
'
goog.style
'
,
'
goog.userAgent
'
]);
goog
.
addDependency
(
"
../../../
"
+
dir
+
"
/core/field.js
"
,
[
'
Blockly.Field
'
],
[
'
goog.asserts
'
,
'
goog.dom
'
,
'
goog.math.Size
'
,
'
goog.style
'
,
'
goog.userAgent
'
]);
goog
.
addDependency
(
"
../../../
"
+
dir
+
"
/core/field_angle.js
"
,
[
'
Blockly.FieldAngle
'
],
[
'
Blockly.FieldTextInput
'
,
'
goog.math
'
,
'
goog.userAgent
'
]);
goog
.
addDependency
(
"
../../../
"
+
dir
+
"
/core/field_angle.js
"
,
[
'
Blockly.FieldAngle
'
],
[
'
Blockly.FieldTextInput
'
,
'
goog.math
'
,
'
goog.userAgent
'
]);
goog
.
addDependency
(
"
../../../
"
+
dir
+
"
/core/field_checkbox.js
"
,
[
'
Blockly.FieldCheckbox
'
],
[
'
Blockly.Field
'
]);
goog
.
addDependency
(
"
../../../
"
+
dir
+
"
/core/field_checkbox.js
"
,
[
'
Blockly.FieldCheckbox
'
],
[
'
Blockly.Field
'
]);
...
@@ -77,7 +77,6 @@ goog.addDependency("async/run.js", ['goog.async.run'], ['goog.async.WorkQueue',
...
@@ -77,7 +77,6 @@ goog.addDependency("async/run.js", ['goog.async.run'], ['goog.async.WorkQueue',
goog
.
addDependency
(
"
async/workqueue.js
"
,
[
'
goog.async.WorkItem
'
,
'
goog.async.WorkQueue
'
],
[
'
goog.asserts
'
,
'
goog.async.FreeList
'
]);
goog
.
addDependency
(
"
async/workqueue.js
"
,
[
'
goog.async.WorkItem
'
,
'
goog.async.WorkQueue
'
],
[
'
goog.asserts
'
,
'
goog.async.FreeList
'
]);
goog
.
addDependency
(
"
color/color.js
"
,
[
'
goog.color
'
,
'
goog.color.Hsl
'
,
'
goog.color.Hsv
'
,
'
goog.color.Rgb
'
],
[
'
goog.color.names
'
,
'
goog.math
'
]);
goog
.
addDependency
(
"
color/color.js
"
,
[
'
goog.color
'
,
'
goog.color.Hsl
'
,
'
goog.color.Hsv
'
,
'
goog.color.Rgb
'
],
[
'
goog.color.names
'
,
'
goog.math
'
]);
goog
.
addDependency
(
"
color/names.js
"
,
[
'
goog.color.names
'
],
[]);
goog
.
addDependency
(
"
color/names.js
"
,
[
'
goog.color.names
'
],
[]);
goog
.
addDependency
(
"
cssom/cssom.js
"
,
[
'
goog.cssom
'
,
'
goog.cssom.CssRuleType
'
],
[
'
goog.array
'
,
'
goog.dom
'
,
'
goog.dom.TagName
'
]);
goog
.
addDependency
(
"
debug/debug.js
"
,
[
'
goog.debug
'
],
[
'
goog.array
'
,
'
goog.html.SafeHtml
'
,
'
goog.html.SafeUrl
'
,
'
goog.html.uncheckedconversions
'
,
'
goog.string.Const
'
,
'
goog.structs.Set
'
,
'
goog.userAgent
'
]);
goog
.
addDependency
(
"
debug/debug.js
"
,
[
'
goog.debug
'
],
[
'
goog.array
'
,
'
goog.html.SafeHtml
'
,
'
goog.html.SafeUrl
'
,
'
goog.html.uncheckedconversions
'
,
'
goog.string.Const
'
,
'
goog.structs.Set
'
,
'
goog.userAgent
'
]);
goog
.
addDependency
(
"
debug/entrypointregistry.js
"
,
[
'
goog.debug.EntryPointMonitor
'
,
'
goog.debug.entryPointRegistry
'
],
[
'
goog.asserts
'
]);
goog
.
addDependency
(
"
debug/entrypointregistry.js
"
,
[
'
goog.debug.EntryPointMonitor
'
,
'
goog.debug.entryPointRegistry
'
],
[
'
goog.asserts
'
]);
goog
.
addDependency
(
"
debug/error.js
"
,
[
'
goog.debug.Error
'
],
[]);
goog
.
addDependency
(
"
debug/error.js
"
,
[
'
goog.debug.Error
'
],
[]);
...
...
core/blockly.js
View file @
34914674
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
// Top level object for Blockly.
// Top level object for Blockly.
goog
.
provide
(
'
Blockly
'
);
goog
.
provide
(
'
Blockly
'
);
// Blockly core dependencies.
goog
.
require
(
'
Blockly.BlockSvg
'
);
goog
.
require
(
'
Blockly.BlockSvg
'
);
goog
.
require
(
'
Blockly.FieldAngle
'
);
goog
.
require
(
'
Blockly.FieldAngle
'
);
goog
.
require
(
'
Blockly.FieldCheckbox
'
);
goog
.
require
(
'
Blockly.FieldCheckbox
'
);
...
@@ -54,8 +53,6 @@ goog.require('Blockly.WidgetDiv');
...
@@ -54,8 +53,6 @@ goog.require('Blockly.WidgetDiv');
goog
.
require
(
'
Blockly.WorkspaceSvg
'
);
goog
.
require
(
'
Blockly.WorkspaceSvg
'
);
goog
.
require
(
'
Blockly.inject
'
);
goog
.
require
(
'
Blockly.inject
'
);
goog
.
require
(
'
Blockly.utils
'
);
goog
.
require
(
'
Blockly.utils
'
);
// Closure dependencies.
goog
.
require
(
'
goog.color
'
);
goog
.
require
(
'
goog.color
'
);
goog
.
require
(
'
goog.userAgent
'
);
goog
.
require
(
'
goog.userAgent
'
);
...
...
core/blocks.js
View file @
34914674
...
@@ -19,19 +19,14 @@
...
@@ -19,19 +19,14 @@
*/
*/
/**
/**
* @fileoverview
Flexible templating system for defining blocks
.
* @fileoverview
Name space for the Blocks singleton
.
* @author spertus@google.com (Ellen Spertus)
* @author spertus@google.com (Ellen Spertus)
*/
*/
'
use strict
'
;
'
use strict
'
;
/**
* Name space for the Blocks singleton.
* Blocks gets populated in the blocks files, possibly through calls to
* Blocks.addTemplate().
*/
goog
.
provide
(
'
Blockly.Blocks
'
);
goog
.
provide
(
'
Blockly.Blocks
'
);
/**
/**
* Unique ID counter for created blocks.
* Unique ID counter for created blocks.
* @private
* @private
...
...
core/css.js
View file @
34914674
...
@@ -26,8 +26,6 @@
...
@@ -26,8 +26,6 @@
goog
.
provide
(
'
Blockly.Css
'
);
goog
.
provide
(
'
Blockly.Css
'
);
goog
.
require
(
'
goog.cssom
'
);
/**
/**
* List of cursors.
* List of cursors.
...
@@ -86,7 +84,12 @@ Blockly.Css.inject = function(hasCss, pathToMedia) {
...
@@ -86,7 +84,12 @@ Blockly.Css.inject = function(hasCss, pathToMedia) {
// Strip off any trailing slash (either Unix or Windows).
// Strip off any trailing slash (either Unix or Windows).
Blockly
.
Css
.
mediaPath_
=
pathToMedia
.
replace
(
/
[\\\/]
$/
,
''
);
Blockly
.
Css
.
mediaPath_
=
pathToMedia
.
replace
(
/
[\\\/]
$/
,
''
);
text
=
text
.
replace
(
/<<<PATH>>>/g
,
Blockly
.
Css
.
mediaPath_
);
text
=
text
.
replace
(
/<<<PATH>>>/g
,
Blockly
.
Css
.
mediaPath_
);
Blockly
.
Css
.
styleSheet_
=
goog
.
cssom
.
addCssText
(
text
).
sheet
;
// Inject CSS tag.
var
cssNode
=
document
.
createElement
(
'
style
'
);
document
.
head
.
appendChild
(
cssNode
);
var
cssTextNode
=
document
.
createTextNode
(
text
);
cssNode
.
appendChild
(
cssTextNode
);
Blockly
.
Css
.
styleSheet_
=
cssNode
.
sheet
;
Blockly
.
Css
.
setCursor
(
Blockly
.
Css
.
Cursor
.
OPEN
);
Blockly
.
Css
.
setCursor
(
Blockly
.
Css
.
Cursor
.
OPEN
);
};
};
...
@@ -99,22 +102,12 @@ Blockly.Css.setCursor = function(cursor) {
...
@@ -99,22 +102,12 @@ Blockly.Css.setCursor = function(cursor) {
return
;
return
;
}
}
Blockly
.
Css
.
currentCursor_
=
cursor
;
Blockly
.
Css
.
currentCursor_
=
cursor
;
/*
var
url
=
'
url(
'
+
Blockly
.
Css
.
mediaPath_
+
'
/
'
+
cursor
+
'
.cur), auto
'
;
Hotspot coordinates are baked into the CUR file, but they are still
required in the CSS due to a Chrome bug.
https://code.google.com/p/chromium/issues/detail?id=1446
*/
if
(
cursor
==
Blockly
.
Css
.
Cursor
.
OPEN
)
{
var
xy
=
'
8 5
'
;
}
else
{
var
xy
=
'
7 3
'
;
}
var
url
=
'
url(
'
+
Blockly
.
Css
.
mediaPath_
+
'
/
'
+
cursor
+
'
.cur)
'
+
xy
+
'
, auto
'
;
// There are potentially hundreds of draggable objects. Changing their style
// There are potentially hundreds of draggable objects. Changing their style
// properties individually is too slow, so change the CSS rule instead.
// properties individually is too slow, so change the CSS rule instead.
var
rule
=
'
.blocklyDraggable {
\n
cursor:
'
+
url
+
'
;
\n
}
\n
'
;
var
rule
=
'
.blocklyDraggable {
\n
cursor:
'
+
url
+
'
;
\n
}
\n
'
;
goog
.
cssom
.
replaceCssRule
(
''
,
rule
,
Blockly
.
Css
.
styleSheet_
,
0
);
Blockly
.
Css
.
styleSheet_
.
deleteRule
(
0
);
Blockly
.
Css
.
styleSheet_
.
insertRule
(
rule
,
0
);
// There is probably only one toolbox, so just change its style property.
// There is probably only one toolbox, so just change its style property.
var
toolboxen
=
document
.
getElementsByClassName
(
'
blocklyToolboxDiv
'
);
var
toolboxen
=
document
.
getElementsByClassName
(
'
blocklyToolboxDiv
'
);
for
(
var
i
=
0
,
toolbox
;
toolbox
=
toolboxen
[
i
];
i
++
)
{
for
(
var
i
=
0
,
toolbox
;
toolbox
=
toolboxen
[
i
];
i
++
)
{
...
...
core/msg.js
View file @
34914674
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
*/
*/
goog
.
provide
(
'
Blockly.Msg
'
);
goog
.
provide
(
'
Blockly.Msg
'
);
/**
/**
* Back up original getMsg function.
* Back up original getMsg function.
* @type {!Function}
* @type {!Function}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment