【问题标题】:Kendo UI Diagram ,SVG scrollbar and height issueKendo UI 图,SVG 滚动条和高度问题
【发布时间】:2018-09-14 12:44:51
【问题描述】:

你好尝试使用剑道图,实现代码在道场https://dojo.telerik.com/IriSAmoR/8。当您使用鼠标缩放图像时,图像隐藏在顶部/底部,无法看到完整的图像。如果左右滚动以查看图像,则很好。放大时附加图像。

让我知道如何查看完整图像?谢谢

【问题讨论】:

    标签: jquery asp.net-mvc-4 kendo-ui


    【解决方案1】:

    缩放和取消缩放功能(我假设您是鼠标悬停和拇指滚轮滚动)是以鼠标位置为中心的仿射变换。您可以添加一个用于重置图表的按钮。

    看到这个Dojo,它有

    <input id="reset" type="button" value="reset" class="k-button">
    

    和

        $(document).ready(function(){
          createDiagram();
          $("#reset").kendoButton({
            click: function() {
              var diagram = $("#diagram").getKendoDiagram();          
                diagram.bringIntoView(diagram.shapes);
            },
          });
        });
    

    【讨论】:

    • 感谢您的回复。但我不想重置图像。
    【解决方案2】:

    找到了一种方法来获得我需要的预期行为。这里是道场https://dojo.telerik.com/IriSAmoR/11。

    下面的代码是修复。

                     zoomRate: 0,
                    dataBound: function () {
                        var bbox = this.boundingBox();
                        this.wrapper.width(bbox.width + bbox.x + 50);
                        this.wrapper.height(bbox.height + bbox.y + 50);
                        this.resize();
                    },

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-30
      • 1970-01-01
      • 2017-01-16
      • 1970-01-01
      • 1970-01-01
      • 2011-08-16
      相关资源
      最近更新 更多