edit_area:
fixed some wrong drawing
layer:
added bounds checking
edit_area:
draw layers sorted