forked from x/icebergs
opt some
This commit is contained in:
parent
1ef53c5610
commit
5a60718d64
@ -56,10 +56,7 @@ func (b *Block) Data(m *ice.Message, meta interface{}) wiki.Chart {
|
|||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
func (b *Block) Draw(m *ice.Message, x, y int) wiki.Chart {
|
func (b *Block) Draw(m *ice.Message, x, y int) wiki.Chart {
|
||||||
float := 3
|
float := kit.Int(kit.Select("2", "7", strings.Contains(m.Option(ice.MSG_USERUA), "iPhone")))
|
||||||
if strings.Contains(m.Option(ice.MSG_USERUA), "iPhone") {
|
|
||||||
float += 0
|
|
||||||
}
|
|
||||||
if m.Option(HIDE_BLOCK) != ice.TRUE {
|
if m.Option(HIDE_BLOCK) != ice.TRUE {
|
||||||
item := wiki.NewItem([]string{`<rect height="%d" width="%d" rx="4" ry="4" x="%d" y="%d"`}, b.GetHeight(), b.GetWidth(), x+b.MarginX/2, y+b.MarginY/2)
|
item := wiki.NewItem([]string{`<rect height="%d" width="%d" rx="4" ry="4" x="%d" y="%d"`}, b.GetHeight(), b.GetWidth(), x+b.MarginX/2, y+b.MarginY/2)
|
||||||
item.Push(`fill="%s"`, b.BackGround).Push(`%v`, b.RectData).Echo("/>").Dump(m)
|
item.Push(`fill="%s"`, b.BackGround).Push(`%v`, b.RectData).Echo("/>").Dump(m)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user