Sha256: 17b957eb8bdc7e3fc46d95cafffd68b7d06ac34a1dd11a81737c786f1f221602
Contents?: true
Size: 1.77 KB
Versions: 8
Compression:
Stored size: 1.77 KB
Contents
/** * this program copied from Blockly and modified * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ <% require 'smalruby_editor' %> // blockly/core/toolbox.js // HACK: don't close category when clicked twice Blockly.Toolbox.TreeNode.prototype.onMouseDown = function(e) { // Expand icon. if (this.hasChildren() && this.isUserCollapsible_) { this.toggle(); this.select(); } else if (this.isSelected()) { //this.getTree().setSelectedItem(null); } else { this.select(); } this.updateRow(); }; Blockly.Blocks.math.HUE = <%= SmalrubyEditor::COLORS[:operators] %>; Blockly.Blocks.texts.HUE = <%= SmalrubyEditor::COLORS[:operators] %>; // blockly/core/names.js Blockly.Names.prototype.safeName_ = function(name) { if (!name) { name = 'unnamed'; } else { // Unfortunately names in non-latin characters will look like // _E9_9F_B3_E4_B9_90 which is pretty meaningless. // HACK: Rubyでは日本語の変数名を許可しているためencodeURIを行わない。 // また、使えない記号を置換する。 name = name.replace(/[ !"#$%&'()=\-~^\\|`@{\[+;*:}\]<>,.?\/]/g, '_') // Most languages don't allow names with leading numbers. if ('0123456789'.indexOf(name[0]) != -1) { name = '_' + name; } } return name; };
Version data entries
8 entries across 8 versions & 1 rubygems