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
9bfca8b0
Commit
9bfca8b0
authored
Jun 11, 2015
by
Neil Fraser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tighten statement connections.
parent
d8175757
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
15 deletions
+17
-15
blockly_compressed.js
blockly_compressed.js
+4
-4
core/block_svg.js
core/block_svg.js
+5
-5
demos/blockfactory/factory.js
demos/blockfactory/factory.js
+8
-6
No files found.
blockly_compressed.js
View file @
9bfca8b0
This diff is collapsed.
Click to expand it.
core/block_svg.js
View file @
9bfca8b0
...
...
@@ -925,10 +925,10 @@ Blockly.BlockSvg.TOP_LEFT_CORNER_HIGHLIGHT =
* Includes the top notch, a horizontal space, and the rounded inside corner.
* @const
*/
Blockly
.
BlockSvg
.
INNER_TOP_LEFT_CORNER
=
Blockly
.
BlockSvg
.
INNER_TOP_LEFT_CORNER
=
'
h 0.5
'
+
Blockly
.
BlockSvg
.
NOTCH_PATH_RIGHT
+
'
h -
'
+
(
Blockly
.
BlockSvg
.
NOTCH_WIDTH
-
15
-
Blockly
.
BlockSvg
.
CORNER_RADIUS
)
+
'
a
'
+
Blockly
.
BlockSvg
.
CORNER_RADIUS
+
'
,
'
+
'
h -0.5
a
'
+
Blockly
.
BlockSvg
.
CORNER_RADIUS
+
'
,
'
+
Blockly
.
BlockSvg
.
CORNER_RADIUS
+
'
0 0,0 -
'
+
Blockly
.
BlockSvg
.
CORNER_RADIUS
+
'
,
'
+
Blockly
.
BlockSvg
.
CORNER_RADIUS
;
...
...
@@ -1120,7 +1120,7 @@ Blockly.BlockSvg.prototype.updateColour = function() {
var
hexColour
=
Blockly
.
makeColour
(
this
.
getColour
());
var
rgb
=
goog
.
color
.
hexToRgb
(
hexColour
);
var
rgbLight
=
goog
.
color
.
lighten
(
rgb
,
0.3
);
var
rgbDark
=
goog
.
color
.
darken
(
rgb
,
0.
4
);
var
rgbDark
=
goog
.
color
.
darken
(
rgb
,
0.
2
);
this
.
svgPathLight_
.
setAttribute
(
'
stroke
'
,
goog
.
color
.
rgbArrayToHex
(
rgbLight
));
this
.
svgPathDark_
.
setAttribute
(
'
fill
'
,
goog
.
color
.
rgbArrayToHex
(
rgbDark
));
this
.
svgPath_
.
setAttribute
(
'
fill
'
,
hexColour
);
...
...
@@ -1913,8 +1913,8 @@ Blockly.BlockSvg.prototype.renderDrawBottom_ =
function
(
steps
,
highlightSteps
,
connectionsXY
,
cursorY
)
{
this
.
height
=
cursorY
+
1
;
// Add one for the shadow.
if
(
this
.
nextConnection
)
{
steps
.
push
(
'
H
'
,
Blockly
.
BlockSvg
.
NOTCH_WIDTH
+
'
'
+
Blockly
.
BlockSvg
.
NOTCH_PATH_RIGHT
);
steps
.
push
(
'
H
'
,
(
Blockly
.
BlockSvg
.
NOTCH_WIDTH
+
(
this
.
RTL
?
0.5
:
-
0.5
))
+
'
'
+
Blockly
.
BlockSvg
.
NOTCH_PATH_RIGHT
);
// Create next block connection.
var
connectionX
;
if
(
this
.
RTL
)
{
...
...
demos/blockfactory/factory.js
View file @
9bfca8b0
...
...
@@ -120,13 +120,15 @@ function formatJson(code, rootBlock) {
contentsBlock
.
nextConnection
.
targetBlock
();
}
// Remove last input if dummy and not empty.
if
(
lastInput
&&
lastInput
.
type
==
'
input_dummy
'
&&
lastInput
.
getInputTargetBlock
(
'
FIELDS
'
))
{
if
(
lastInput
.
align
)
{
JS
.
lastDummyAlign
=
lastInput
.
align
;
if
(
lastInput
&&
lastInput
.
type
==
'
input_dummy
'
)
{
var
fields
=
lastInput
.
getInputTargetBlock
(
'
FIELDS
'
);
if
(
fields
&&
getFieldsJson_
(
fields
).
join
(
''
).
trim
()
!=
''
)
{
if
(
lastInput
.
align
)
{
JS
.
lastDummyAlign
=
lastInput
.
align
;
}
args
.
pop
();
message
.
pop
();
}
args
.
pop
();
message
.
pop
();
}
JS
.
message
=
message
.
join
(
'
'
);
JS
.
args
=
args
;
...
...
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