don't allow decimals in led x y fields (#1389)

This commit is contained in:
Sam El-Husseini
2018-10-12 20:56:44 -07:00
committed by GitHub
parent a5ee26ec4b
commit 1b7c51e5b5
3 changed files with 10 additions and 2 deletions

View File

@ -62,6 +62,7 @@
//% blockId=device_led_toggle block="toggle|x %x|y %y" icon="\uf204" blockGap=8
//% parts="ledmatrix"
//% x.min=0 x.max=4 y.min=0 y.max=4
//% x.fieldOptions.precision=1 y.fieldOptions.precision=1
export function toggle(x: number, y: number): void {
if (led.point(x, y)) {
led.unplot(x, y);