gpt4 book ai didi

jQuery 旋钮 tron 皮肤问题

转载 作者:行者123 更新时间:2023-12-01 06:12:59 26 4
gpt4 key购买 nike

如果有人以前使用过这个插件:

https://github.com/aterrien/jQuery-Knob

我正在尝试应用皮肤:“tron”

尝试添加 <input data-skin="tron">但没有成功,还在初始化代码中尝试过:

$(".dial").knob({       
readOnly:true,
thickness:0.05,
width:100,
fgColor:"#cc0000",
bgColor:"#ccc",
skin:"tron"

});

有人知道可能出了什么问题吗?

最佳答案

以防万一有人正在寻找相同的答案,应该尝试这个,在演示页面中找到,但不知道为什么这样的代码不包含在源脚本中!

将此作为选项包含在旋钮方法中:

draw : function () {

// "tron" case
if(this.$.data('skin') == 'tron') {

this.cursorExt = 0.3;

var a = this.arc(this.cv) // Arc
, pa // Previous arc
, r = 1;

this.g.lineWidth = this.lineWidth;

if (this.o.displayPrevious) {
pa = this.arc(this.v);
this.g.beginPath();
this.g.strokeStyle = this.pColor;
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, pa.s, pa.e, pa.d);
this.g.stroke();
}

this.g.beginPath();
this.g.strokeStyle = r ? this.o.fgColor : this.fgColor ;
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, a.s, a.e, a.d);
this.g.stroke();

this.g.lineWidth = 2;
this.g.beginPath();
this.g.strokeStyle = this.o.fgColor;
this.g.arc( this.xy, this.xy, this.radius - this.lineWidth + 1 + this.lineWidth * 2 / 3, 0, 2 * Math.PI, false);
this.g.stroke();

return false;
}
}

关于jQuery 旋钮 tron 皮肤问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22810583/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com