Skip to content

Commit 98f0f71

Browse files
author
ColinTree
committed
0.3.3: adjust methods' alignment
1 parent bb2d1f5 commit 98f0f71

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

assets/plugin.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ require(['gitbook', 'jQuery'], function(gitbook, $) {
5757
}
5858
};
5959

60-
newBlockAndWorkspace(blockId, scale).moveBy(output?8:0, 0);
60+
newBlockAndWorkspace(blockId, scale);
6161
});
6262

6363
// EVENT
@@ -125,7 +125,7 @@ require(['gitbook', 'jQuery'], function(gitbook, $) {
125125
}
126126
};
127127

128-
newBlockAndWorkspace(blockId, scale).moveBy((getter?8:0), 0);
128+
newBlockAndWorkspace(blockId, scale);
129129
});
130130
});
131131
});
@@ -160,12 +160,11 @@ function newBlockAndWorkspace(id, scale) {
160160

161161
var block = workspace.newBlock('dynamicCreated_'+id);
162162
block.initSvg();
163+
block.moveBy(8, 0);
163164
block.render();
164165

165166
var metrics = workspace.getMetrics();
166-
$("#"+id).height(metrics.contentHeight).width(metrics.contentWidth);
167+
$("#"+id).height(metrics.contentHeight).width(metrics.contentWidth + 8);
167168
Blockly.svgResize(workspace);
168169
workspace.render();
169-
170-
return block;
171170
}

example.png

-336 Bytes
Loading

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@
5050
"type": "git",
5151
"url": "git+https://github.com/ColinTree/gitbook-plugin-ai2-blocks.git"
5252
},
53-
"version": "0.3.2"
53+
"version": "0.3.3"
5454
}

0 commit comments

Comments
 (0)