code: function isRectLayer(layer) {
  	var method = layer._method;
  	return (method === $.fn.drawRect || method === $.fn.drawEllipse || method === $.fn.drawImage);
  }
docs: Determines if the given layer is a rectangular layer