Ember.js + jQuery UI Draggable Clone

后端 未结 2 1892
遥遥无期
遥遥无期 2020-12-15 11:15

I am trying to use Ember.js in conjunction with jQuery UI\'s draggable functionality, but I am encountering problems. Specifically, when using the clone helper, I am not abl

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-15 11:45

    I was having the same issue using Ember 1.0.0 RC6. I've found that just replacing the clone string with a function which returns the clone works fine.

      this.$().draggable({
        // helper: 'clone'
        helper: function() {
          return $(this).clone();
        }
      });
    

    In Coffeescript

    @$().draggable
        # helper: 'clone'
        helper: ->
            $(@).clone()
    

提交回复
热议问题