小编Gab*_*ciu的帖子

joint.js触发新克隆元素的拖动开始

如何在关节js中的克隆关节元素上触发pointerdown/dragstart? 在工具箱纸上toolBoxPointerDown触发pointerdown事件时触发. addNode在触发pointerup事件时触发_this.paperDrag.

var toolBoxPointerDown = function(cell, event) {
        _this.action = 'addNode';
        $(document.body).append(_this.paperDrag.$el); 
        _this.clone = cell.model.clone(), _this.cloneBbox = cell.getBBox();

        _this.clone.set("position", {
            x: cell.model.attributes.position.x,
            y: cell.model.attributes.position.y 
        }), _this.paperDrag.addCell(_this.clone), _this.paperDrag.setDimensions("100%", "100%");

        _this.paperDrag.$el.offset({
            left: 0,
            top: 0
        });

        _this.paperDrag.findViewByModel(_this.clone.id).pointerdown();
    }

    var addNode = function(node, position) {
        var celltoAdd = _this.clone.clone();
        celltoAdd.set('position', { x: _this.clone.get('position').x - $('.toolbox').width(), y: _this.clone.get('position').y });


        if(celltoAdd.attributes.position.x > - 50){
            renderNode(celltoAdd.attributes);
        }
         _this.paperDrag.$el.detach();
        _this.clone.remove();
        _this.action = 'nodeAdded';
    }
Run Code Online (Sandbox Code Playgroud)

jquery jointjs

7
推荐指数
1
解决办法
1329
查看次数

UWP 访问冲突异常

当我在绑定到 UWP 中的枢轴控件的 ObservableCollection 中将项目从一个选项卡移动到另一个选项卡时,出现以下异常。

在 IRIS.ZustellerApp.exe 中的 0x699C7165 (Windows.UI.Xaml.Phone.dll) 处抛出异常:0xC0000005:访问冲突读取位置 0x00000000。

我还设法挖掘了转储,似乎异常发生在 Windows_UI_Xaml_Phone!XamlControlsTestHookCreateLoopingSelector

有趣的是,这并不尊重每次重现的相同模式。我几乎尝试了一切来解决这个问题,但没有结果。提前致谢。

c# exception nullpointerexception access-violation uwp

5
推荐指数
1
解决办法
2916
查看次数

.attr 选择器不会在每个循环中工作?

这是代码:

  $.ajax({
      url: 'AEWService.asmx/previewAsset',
      type: "GET",
      contentType: "application/json; charset=utf-8",
      data: json,
      success: function (json) {
          var prevObj = jQuery.parseJSON(json.d);
          setInterval(function () {
              var pId = $('#previewIframe').contents().find('[preview-id]');
              $.each(prevObj, function (i, item) {
                  pId.each(function () {
                      var pElem = this.attr("preview-id");
                      if (pElem == item.Id) {
                          $(this).html(item.Value);
                      }
                  });
              });
          }, 3000);
      }
  });
Run Code Online (Sandbox Code Playgroud)

javascript jquery

0
推荐指数
1
解决办法
83
查看次数