MOD: modified the shapeid to layerid for addShape method of Canvas