Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(graphic): add draggable support to group elements. #11959

Merged
merged 1 commit into from
Jan 7, 2020

Conversation

pissang
Copy link
Contributor

@pissang pissang commented Dec 31, 2019

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

The code change is mainly in the PR ecomfe/zrender#555

This PR is about adding a case to test draggle on the group elements.

draggable-group

Related issue

#5569

Usage

{
  type: 'group',
  draggable: true,
  children: [...]
}

@pissang pissang merged commit 3e728eb into master Jan 7, 2020
@pissang pissang deleted the group-draggable branch January 7, 2020 06:06
@Ovilia Ovilia added this to the 4.7.0 milestone Feb 21, 2020
@inkn
Copy link

inkn commented Feb 27, 2020

when it can be used?

@pissang
Copy link
Contributor Author

pissang commented Mar 20, 2020

@inkn It has been included in the version 4.7.0 published a few days ago

@llcat
Copy link

llcat commented May 13, 2020

@pissang hi, can i use the draggable setting in custom series renderItem function?, i have updated echarts version to 4.7.0, it seems no use, this is mine code:

return {
            type: 'group',
            position: [10, c2[1]],
            draggable: true,
            name: 'test',
            ondrag: function() {
                console.log('----drag')
            },
            children: [
                {
                    type: 'rect',
                    draggable: true,
                    ondrag: function() {
                        console.log('----drag')
                    },
                    shape: {
                        x: 10,
                        y: 10,
                        width: 20,
                        height: 20
                    },
                    style: {
                        fill: '#ccc'
                    }
                }
            ]
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants