30.zooming 缩放

406 阅读2分钟

Zooming (d3-zoom)

Pan and zoom SVG, HTML or Canvas using mouse or touch input.使用鼠标或触摸输入平移和缩放SVG、HTML或画布。

  • d3.zoom - create a zoom behavior.创建缩放行为。
  • zoom - apply the zoom behavior to the selected elements.将缩放行为应用于选定图元。
  • zoom.transform - change the transform for the selected elements.更改选定元素的变换。
  • zoom.translateBy - translate the transform for the selected elements.平移选定元素的变换。
  • zoom.translateTo - translate the transform for the selected elements.平移选定元素的变换。
  • zoom.scaleBy - scale the transform for the selected elements.缩放选定元素的变换。
  • zoom.scaleTo - scale the transform for the selected elements.缩放选定元素的变换。
  • zoom.constrain - override the transform constraint logic.覆盖变换约束逻辑。
  • zoom.filter - control which input events initiate zooming.控制哪些输入事件启动缩放。
  • zoom.touchable - set the touch support detector.设置触摸支持检测器。
  • zoom.wheelDelta - override scaling for wheel events.覆盖控制盘事件的缩放。
  • zoom.extent - set the extent of the viewport.设置视口的范围。
  • zoom.scaleExtent - set the allowed scale range.设置允许的刻度范围。
  • zoom.translateExtent - set the extent of the zoomable world.设置可缩放世界的范围。
  • zoom.clickDistance - set the click distance threshold.设置“单击距离”阈值。
  • zoom.tapDistance - set the tap distance threshold.设置分接距离阈值。
  • zoom.duration - set the duration of zoom transitions.设置缩放变换的持续时间
  • zoom.interpolate - control the interpolation of zoom transitions.控制缩放变换的插值。
  • zoom.on - listen for zoom events.收听缩放事件。
  • d3.zoomTransform - get the zoom transform for a given element.获取给定元素的缩放变换。
  • transform.scale - scale a transform by the specified amount.按指定的量缩放变换。
  • transform.translate - translate a transform by the specified amount.按指定的量转换变换。
  • transform.apply - apply the transform to the given point.将变换应用于给定点。
  • transform.applyX - apply the transform to the given x-coordinate.将变换应用于给定的x-坐标
  • transform.applyY - apply the transform to the given y-coordinate.将变换应用于给定的y-坐标。
  • transform.invert - unapply the transform to the given point.将变换取消应用到给定点。
  • transform.invertX - unapply the transform to the given x-coordinate.将变换取消应用到给定的x-坐标。
  • transform.invertY - unapply the transform to the given y-coordinate.将变换取消应用到给定的y-坐标。
  • transform.rescaleX - apply the transform to an x-scale’s domain.将变换应用于x比例的域。
  • transform.rescaleY - apply the transform to a y-scale’s domain.将变换应用于y-比例的域。
  • transform.toString - format the transform as an SVG transform string.将转换格式化为SVG转换字符串。
  • d3.zoomIdentity - the identity transform.标识符转换。