onOpen(), onClose() methods calling fix when dragging layer