react-anything-sortable icon indicating copy to clipboard operation
react-anything-sortable copied to clipboard

drag speed when using css zoom

Open mikevandre opened this issue 8 years ago • 5 comments

We are using css zoom to change the dynamically scale down the size of a group of react controls that includes a sortable and sortable items. When doing so, if we drag a control to sort then it will drag at a slower speed then the mouse.

mikevandre avatar Jun 17 '16 12:06 mikevandre

interesting, I'm unfamiliar with how zoom works, so a working demo might help.

Sent from my iPhone

On Jun 17, 2016, at 20:56, mikevandre [email protected] wrote:

We are using css zoom to change the dynamically scale down the size of a group of react controls that includes a sortable and sortable items. When doing so, if we drag a control to sort then it will drag at a slower speed then the mouse.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

jasonslyvia avatar Jun 18 '16 04:06 jasonslyvia

Closing for no further progress.

jasonslyvia avatar Jun 27 '16 02:06 jasonslyvia

Im sorry. I left for vacation and just got back. If you could re-open this ticket I would really appreciate. Here is some sample code. You will notice that the cursor moves slower than the div being moved. If you change zoom to less than 1 then the cursor will move faster than the div:

import React, {PropTypes} from 'react';
import Sortable from 'react-anything-sortable';
import DemoHOCItem from './DemoHOCItem.jsx';

const styles= {
    superbig: {
        zoom: 2.5,
    }
};


class SortableZoom extends React.Component {

    render() {
        const {onRowMoved} = this.props;
        return (
            <div style={styles.superbig}>
                <Sortable onSort={onRowMoved}>
                    <DemoHOCItem className="item-1" key={1}>one</DemoHOCItem>
                    <DemoHOCItem className="item-2" key={2}>two</DemoHOCItem>
                    <DemoHOCItem className="item-3" key={3}>three</DemoHOCItem>
                </Sortable>
                </div>
        );
    };
};


export default SortableZoom;

mikevandre avatar Jun 27 '16 20:06 mikevandre

No problem, I'll look into it.

jasonslyvia avatar Jun 28 '16 00:06 jasonslyvia

Hi, i am also having the same issue. Please let me know if you have any solution for this.

LalithaReddy avatar Jul 28 '16 19:07 LalithaReddy