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
7dc329be
Commit
7dc329be
authored
Sep 02, 2014
by
carlospamg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'blockly-original'
parents
b57b7199
7f77add4
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
blockly_compressed.js
blockly_compressed.js
+4
-4
core/field_dropdown.js
core/field_dropdown.js
+17
-0
No files found.
blockly_compressed.js
View file @
7dc329be
This diff is collapsed.
Click to expand it.
core/field_dropdown.js
View file @
7dc329be
...
@@ -127,7 +127,24 @@ Blockly.FieldDropdown.prototype.showEditor_ = function() {
...
@@ -127,7 +127,24 @@ Blockly.FieldDropdown.prototype.showEditor_ = function() {
menu
.
addChild
(
menuItem
,
true
);
menu
.
addChild
(
menuItem
,
true
);
menuItem
.
setChecked
(
value
==
this
.
value_
);
menuItem
.
setChecked
(
value
==
this
.
value_
);
}
}
// Listen for mouse/keyboard events.
goog
.
events
.
listen
(
menu
,
goog
.
ui
.
Component
.
EventType
.
ACTION
,
callback
);
goog
.
events
.
listen
(
menu
,
goog
.
ui
.
Component
.
EventType
.
ACTION
,
callback
);
// Listen for touch events (why doesn't Closure handle this already?).
function
callbackTouchStart
(
e
)
{
var
control
=
this
.
getOwnerControl
(
/** @type {Node} */
(
e
.
target
));
// Highlight the menu item.
control
.
handleMouseDown
(
e
);
}
function
callbackTouchEnd
(
e
)
{
var
control
=
this
.
getOwnerControl
(
/** @type {Node} */
(
e
.
target
));
// Activate the menu item.
control
.
performActionInternal
(
e
);
}
menu
.
getHandler
().
listen
(
menu
.
getElement
(),
goog
.
events
.
EventType
.
TOUCHSTART
,
callbackTouchStart
);
menu
.
getHandler
().
listen
(
menu
.
getElement
(),
goog
.
events
.
EventType
.
TOUCHEND
,
callbackTouchEnd
);
// Record windowSize and scrollOffset before adding menu.
// Record windowSize and scrollOffset before adding menu.
var
windowSize
=
goog
.
dom
.
getViewportSize
();
var
windowSize
=
goog
.
dom
.
getViewportSize
();
var
scrollOffset
=
goog
.
style
.
getViewportPageOffset
(
document
);
var
scrollOffset
=
goog
.
style
.
getViewportPageOffset
(
document
);
...
...
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