mirror of
https://github.com/google/blockly.git
synced 2026-01-07 09:00:11 +01:00
Merge remote-tracking branch 'google/master' into feature/blockly-update
This commit is contained in:
@@ -68,18 +68,18 @@ Blockly.Comment.prototype.height_ = 80;
|
||||
*/
|
||||
Blockly.Comment.prototype.drawIcon_ = function(group) {
|
||||
// Circle.
|
||||
Blockly.createSvgElement('circle',
|
||||
Blockly.utils.createSvgElement('circle',
|
||||
{'class': 'blocklyIconShape', 'r': '8', 'cx': '8', 'cy': '8'},
|
||||
group);
|
||||
// Can't use a real '?' text character since different browsers and operating
|
||||
// systems render it differently.
|
||||
// Body of question mark.
|
||||
Blockly.createSvgElement('path',
|
||||
Blockly.utils.createSvgElement('path',
|
||||
{'class': 'blocklyIconSymbol',
|
||||
'd': 'm6.8,10h2c0.003,-0.617 0.271,-0.962 0.633,-1.266 2.875,-2.405 0.607,-5.534 -3.765,-3.874v1.7c3.12,-1.657 3.698,0.118 2.336,1.25 -1.201,0.998 -1.201,1.528 -1.204,2.19z'},
|
||||
group);
|
||||
// Dot of question point.
|
||||
Blockly.createSvgElement('rect',
|
||||
// Dot of question mark.
|
||||
Blockly.utils.createSvgElement('rect',
|
||||
{'class': 'blocklyIconSymbol',
|
||||
'x': '6.8', 'y': '10.78', 'height': '2', 'width': '2'},
|
||||
group);
|
||||
@@ -100,7 +100,7 @@ Blockly.Comment.prototype.createEditor_ = function() {
|
||||
</body>
|
||||
</foreignObject>
|
||||
*/
|
||||
this.foreignObject_ = Blockly.createSvgElement('foreignObject',
|
||||
this.foreignObject_ = Blockly.utils.createSvgElement('foreignObject',
|
||||
{'x': Blockly.Bubble.BORDER_WIDTH, 'y': Blockly.Bubble.BORDER_WIDTH},
|
||||
null);
|
||||
var body = document.createElementNS(Blockly.HTML_NS, 'body');
|
||||
@@ -112,12 +112,12 @@ Blockly.Comment.prototype.createEditor_ = function() {
|
||||
body.appendChild(textarea);
|
||||
this.textarea_ = textarea;
|
||||
this.foreignObject_.appendChild(body);
|
||||
Blockly.bindEvent_(textarea, 'mouseup', this, this.textareaFocus_);
|
||||
Blockly.bindEventWithChecks_(textarea, 'mouseup', this, this.textareaFocus_);
|
||||
// Don't zoom with mousewheel.
|
||||
Blockly.bindEvent_(textarea, 'wheel', this, function(e) {
|
||||
Blockly.bindEventWithChecks_(textarea, 'wheel', this, function(e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
Blockly.bindEvent_(textarea, 'change', this, function(e) {
|
||||
Blockly.bindEventWithChecks_(textarea, 'change', this, function(e) {
|
||||
if (this.text_ != textarea.value) {
|
||||
Blockly.Events.fire(new Blockly.Events.Change(
|
||||
this.block_, 'comment', null, this.text_, textarea.value));
|
||||
|
||||
Reference in New Issue
Block a user