【问题标题】:Angular gridster moving issue角度网格移动问题
【发布时间】:2017-05-27 16:13:42
【问题描述】:

我正在尝试使用 angular gridster 创建一个示例,但我无法达到我的目标。我想要做的是,如果我在 B 项和 C 项之间移动 A 项,C 项将向右推,B 项向左推,A 项将取代 B 项。

发生的情况是我只能将一个项目移动到一个空的地方。 以下是我正在使用的选项:

$scope.gridsterOptions = {
    columns: 12,
    maxRows: 1,
    pushing: false,
    floating: false,
    resizable: {
        enabled: false,
    },
    draggable: {
        enabled: true, // whether dragging items is supported
    }
};

任何人都可以解决这个问题吗? 这是plunker上的示例代码。

【问题讨论】:

    标签: angularjs gridster


    【解决方案1】:

    pushing: false, 之后添加这个新行:

    swapping: true,
    

    这应该可以解决它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-26
      • 2021-05-02
      • 1970-01-01
      • 2016-08-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多