Skip to content

Resize callback gets the map object for the widget #213

@mconner

Description

@mconner

When using a custom item map, the "widget" passed to the resize function is the map, rather than the original source object. For example, using the demo script.js, and adding:

resize: function(event, $element, widget) {
    console.log("in resizeable.resize", widget);
}

to the resizable config. When doing a resize, the output is:
in resizeable.resize Object {sizeX: "item.size.x", sizeY: "item.size.y", row: "item.position[0]", col: "item.position[1]"}

I would think it should be the actual object, as defined in $scope.customItems[n]. For example:

{
    size: {x: 2, y: 1 },
    position: [0, 0]
}

I think this applies to the other callbacks, as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions