1 Star 0 Fork 0

冰原狼/kankanolss

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fieldeditors.js 2.16 KB
一键复制 编辑 原始数据 按行查看 历史
kankanol 提交于 2022-03-17 18:34 . init
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
"use strict";
/// <reference path="../node_modules/pxt-core/built/pxteditor.d.ts"/>
/// <reference path="../node_modules/pxt-core/built/pxtsim.d.ts"/>
Object.defineProperty(exports, "__esModule", { value: true });
const field_gestures_1 = require("./field_gestures");
pxt.editor.initFieldExtensionsAsync = function (opts) {
pxt.debug('loading pxt-microbit field editors...');
const res = {
fieldEditors: [{
selector: "gestures",
editor: field_gestures_1.FieldGestures
}]
};
return Promise.resolve(res);
};
},{"./field_gestures":2}],2:[function(require,module,exports){
"use strict";
/// <reference path="../node_modules/pxt-core/localtypings/blockly.d.ts"/>
/// <reference path="../node_modules/pxt-core/built/pxtblocks.d.ts"/>
/// <reference path="../node_modules/pxt-core/built/pxtsim.d.ts"/>
Object.defineProperty(exports, "__esModule", { value: true });
exports.FieldGestures = void 0;
class FieldGestures extends pxtblockly.FieldImages {
constructor(text, options, validator) {
super(text, options, validator);
this.isFieldCustom_ = true;
this.buttonClick_ = function (e) {
let value = e.target.getAttribute('data-value');
this.setValue(value);
Blockly.DropDownDiv.hide();
};
this.columns_ = parseInt(options.columns) || 4;
this.width_ = parseInt(options.width) || 350;
this.addLabel_ = true;
this.renderSelectedImage_ = Blockly.FieldDropdown.prototype.renderSelectedText_;
this.updateSize_ = Blockly.Field.prototype.updateSize_;
}
trimOptions_() {
}
}
exports.FieldGestures = FieldGestures;
},{}]},{},[1,2]);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kankanol/kankanolss.git
git@gitee.com:kankanol/kankanolss.git
kankanol
kankanolss
kankanolss
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385