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
09f5ac6f
Commit
09f5ac6f
authored
Jul 13, 2015
by
Neil Fraser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove non-functioning workspace long-click.
parent
fd1e63e2
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
23 deletions
+17
-23
blockly_compressed.js
blockly_compressed.js
+7
-8
core/block.js
core/block.js
+1
-1
core/blockly.js
core/blockly.js
+4
-8
core/connection.js
core/connection.js
+1
-1
core/field.js
core/field.js
+1
-1
core/inject.js
core/inject.js
+0
-2
core/input.js
core/input.js
+3
-2
No files found.
blockly_compressed.js
View file @
09f5ac6f
This diff is collapsed.
Click to expand it.
core/block.js
View file @
09f5ac6f
...
@@ -1208,7 +1208,7 @@ Blockly.Block.prototype.removeInput = function(name, opt_quiet) {
...
@@ -1208,7 +1208,7 @@ Blockly.Block.prototype.removeInput = function(name, opt_quiet) {
/**
/**
* Fetches the named input object.
* Fetches the named input object.
* @param {string} name The name of the input.
* @param {string} name The name of the input.
* @return {
?
Blockly.Input} The input object, or null of the input does not exist.
* @return {Blockly.Input} The input object, or null of the input does not exist.
*/
*/
Blockly
.
Block
.
prototype
.
getInput
=
function
(
name
)
{
Blockly
.
Block
.
prototype
.
getInput
=
function
(
name
)
{
for
(
var
i
=
0
,
input
;
input
=
this
.
inputList
[
i
];
i
++
)
{
for
(
var
i
=
0
,
input
;
input
=
this
.
inputList
[
i
];
i
++
)
{
...
...
core/blockly.js
View file @
09f5ac6f
...
@@ -391,19 +391,15 @@ Blockly.longPid_ = 0;
...
@@ -391,19 +391,15 @@ Blockly.longPid_ = 0;
* which after about a second opens the context menu. The tasks is killed
* which after about a second opens the context menu. The tasks is killed
* if the touch event terminates early.
* if the touch event terminates early.
* @param {!Event} e Touch start event.
* @param {!Event} e Touch start event.
* @param {
Blockly.Block} block The block under the touchstart event, or null
* @param {
!Blockly.Block|!Blockly.WorkspaceSvg} uiObject The block or workspace
*
if the event was on the workspace
.
*
under the touchstart event
.
* @private
* @private
*/
*/
Blockly
.
longStart_
=
function
(
e
,
block
)
{
Blockly
.
longStart_
=
function
(
e
,
uiObject
)
{
Blockly
.
longStop_
();
Blockly
.
longStop_
();
Blockly
.
longPid_
=
setTimeout
(
function
()
{
Blockly
.
longPid_
=
setTimeout
(
function
()
{
e
.
button
=
2
;
// Simulate a right button click.
e
.
button
=
2
;
// Simulate a right button click.
if
(
block
)
{
uiObject
.
onMouseDown_
(
e
);
block
.
onMouseDown_
(
e
);
}
else
{
Blockly
.
onMouseDown_
(
e
);
}
},
Blockly
.
LONGPRESS
);
},
Blockly
.
LONGPRESS
);
};
};
...
...
core/connection.js
View file @
09f5ac6f
...
@@ -38,7 +38,7 @@ goog.require('goog.dom');
...
@@ -38,7 +38,7 @@ goog.require('goog.dom');
*/
*/
Blockly
.
Connection
=
function
(
source
,
type
)
{
Blockly
.
Connection
=
function
(
source
,
type
)
{
this
.
sourceBlock_
=
source
;
this
.
sourceBlock_
=
source
;
/** @type {
?
Blockly.Connection} */
/** @type {Blockly.Connection} */
this
.
targetConnection
=
null
;
this
.
targetConnection
=
null
;
/** @type {number} */
/** @type {number} */
this
.
type
=
type
;
this
.
type
=
type
;
...
...
core/field.js
View file @
09f5ac6f
...
@@ -180,7 +180,7 @@ Blockly.Field.prototype.setVisible = function(visible) {
...
@@ -180,7 +180,7 @@ Blockly.Field.prototype.setVisible = function(visible) {
/**
/**
* Sets a new change handler for editable fields.
* Sets a new change handler for editable fields.
* @param {
?
Function} handler New change handler, or null.
* @param {Function} handler New change handler, or null.
*/
*/
Blockly
.
Field
.
prototype
.
setChangeHandler
=
function
(
handler
)
{
Blockly
.
Field
.
prototype
.
setChangeHandler
=
function
(
handler
)
{
this
.
changeHandler_
=
handler
;
this
.
changeHandler_
=
handler
;
...
...
core/inject.js
View file @
09f5ac6f
...
@@ -412,8 +412,6 @@ Blockly.init_ = function(mainWorkspace) {
...
@@ -412,8 +412,6 @@ Blockly.init_ = function(mainWorkspace) {
// Also, 'keydown' has to be on the whole document since the browser doesn't
// Also, 'keydown' has to be on the whole document since the browser doesn't
// understand a concept of focus on the SVG image.
// understand a concept of focus on the SVG image.
Blockly
.
bindEvent_
(
svg
,
'
touchstart
'
,
null
,
function
(
e
)
{
Blockly
.
longStart_
(
e
,
null
);});
Blockly
.
bindEvent_
(
window
,
'
resize
'
,
null
,
Blockly
.
bindEvent_
(
window
,
'
resize
'
,
null
,
function
()
{
Blockly
.
svgResize
(
mainWorkspace
);});
function
()
{
Blockly
.
svgResize
(
mainWorkspace
);});
...
...
core/input.js
View file @
09f5ac6f
...
@@ -47,14 +47,15 @@ Blockly.Input = function(type, name, block, connection) {
...
@@ -47,14 +47,15 @@ Blockly.Input = function(type, name, block, connection) {
this
.
type
=
type
;
this
.
type
=
type
;
/** @type {string} */
/** @type {string} */
this
.
name
=
name
;
this
.
name
=
name
;
/** @type {!Blockly.Block} */
this
.
sourceBlock_
=
block
;
this
.
sourceBlock_
=
block
;
/** @type {Blockly.Connection} */
/** @type {Blockly.Connection} */
this
.
connection
=
connection
;
this
.
connection
=
connection
;
/** @type {
Blockly.Field[]
} */
/** @type {
!Array.<!Blockly.Field>
} */
this
.
fieldRow
=
[];
this
.
fieldRow
=
[];
/** @type {number} */
/** @type {number} */
this
.
align
=
Blockly
.
ALIGN_LEFT
;
this
.
align
=
Blockly
.
ALIGN_LEFT
;
/** @type {boolean} */
this
.
visible_
=
true
;
this
.
visible_
=
true
;
};
};
...
...
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