Editor: fix bug in canvas limits calculation