cax - fix button init error

This commit is contained in:
dntzhang 2019-05-12 18:16:01 +08:00
parent e72efe3600
commit 3bbd6c3be7
1 changed files with 4 additions and 4 deletions

View File

@ -6,10 +6,10 @@ import Bitmap from '../bitmap'
/*
Options
font:
text:
text:
textColor:
image: [path, width, height]
bgColor:
bgColor:
bgImage: [path, width, height]
borderRadius:
borderColor:
@ -75,7 +75,7 @@ class Button extends Group {
}
if (option.bgImage) {
var ratio = SCALE_RATIO
var ratio = option.ratio || 1
let bitmap = new Bitmap(option.bgImage[0])
bitmap.scaleX = ratio
bitmap.scaleY = ratio
@ -98,7 +98,7 @@ class Button extends Group {
}
if (option.image) {
var ratio = SCALE_RATIO
var ratio = option.ratio || 1
let bitmap = new Bitmap(option.image[0])
bitmap.scaleX = ratio
bitmap.scaleY = ratio