set dragging flag function in palettes