在 Spreader Click 上禁用

Disabling In on Spreader Click

我试图禁用点击 'Spreader' 按钮。似乎无法阻止它关闭。我有一个我想保留的 onmousedown 事件,但我不想关闭吊具。有人知道禁用点击传播器的最佳方法吗?

您可以设置 minPercent 属性 来满足您的需要。

var wheel;

window.onload = function () {
  wheel = new wheelnav("wheelDiv");
  wheel.spreaderEnable = true;
  wheel.createWheel(["This", "is", "custom", "spreader"]);
  wheel.spreadWheel();

  var wheelspreader = document.getElementById("wheelnav-wheelDiv-spreader");
  var wheelspreadertitle = document.getElementById("wheelnav-wheelDiv-spreadertitle");
  wheelspreader.onmousedown = function() {openSpreader();}
  wheelspreadertitle.onmousedown = function() {openSpreader();}
};

var openSpreader = function() {
  wheel.minPercent = wheel.maxPercent;
}

这是一个 JS Bin