mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-30 04:20:23 +00:00
Minor change in sprite.js
This commit is contained in:
parent
d6324396a0
commit
eb387898c3
@ -4,11 +4,25 @@ var a = new Sprite(32, 64)
|
||||
console.assert(a.width == 32)
|
||||
console.assert(a.height == 64)
|
||||
console.assert(a.colorMode == ColorMode.RGB) // RGB by default
|
||||
a.selection.select(2, 3, 4, 5)
|
||||
console.assert(a.selection.bounds.x == 2)
|
||||
console.assert(a.selection.bounds.y == 3)
|
||||
console.assert(a.selection.bounds.width == 4)
|
||||
console.assert(a.selection.bounds.height == 5)
|
||||
|
||||
var s = a.selection
|
||||
console.assert(s.bounds.x == 0)
|
||||
console.assert(s.bounds.y == 0)
|
||||
console.assert(s.bounds.width == 0)
|
||||
console.assert(s.bounds.height == 0)
|
||||
|
||||
s.selectAll()
|
||||
console.assert(s.bounds.x == 0)
|
||||
console.assert(s.bounds.y == 0)
|
||||
console.assert(s.bounds.width == a.width)
|
||||
console.assert(s.bounds.height == a.height)
|
||||
|
||||
s.select(2, 3, 4, 5)
|
||||
console.assert(s.bounds.x == 2)
|
||||
console.assert(s.bounds.y == 3)
|
||||
console.assert(s.bounds.width == 4)
|
||||
console.assert(s.bounds.height == 5)
|
||||
|
||||
a.crop()
|
||||
console.assert(a.width == 4)
|
||||
console.assert(a.height == 5)
|
||||
|
Loading…
x
Reference in New Issue
Block a user