Skip to content

Commit

Permalink
witcat ext 1.1 修复文本框获取颜色的BUG (Gandi-IDE#64)
Browse files Browse the repository at this point in the history
* 修复获取颜色的BUG

fix(block):修复修改为箭头函数导致的undefined的BUG
  • Loading branch information
little-starts authored Jan 19, 2023
1 parent 9baf0f9 commit f680ca4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wit_cat/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ let keypress = {};
let lastKey = "", MouseWheel = 0;
let timer;


//找渲染cvs
let cvs = document.getElementsByTagName("canvas")[0];
if (cvs === null) {
Expand Down Expand Up @@ -720,7 +719,7 @@ window.tempExt = {

/* vim: set expandtab tabstop=2 shiftwidth=2: */
//颜色转换
String.prototype.colorHex = () => {
String.prototype.colorHex = function () {
// RGB颜色值的正则
var reg = /^(rgb|RGB)/;
var color = this;
Expand All @@ -741,6 +740,7 @@ String.prototype.colorHex = () => {
return String(color);
}
};

//键盘事件监听
document.addEventListener("keydown", keydown);
document.addEventListener("keyup", keyup);
Expand Down

0 comments on commit f680ca4

Please sign in to comment.