Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/430.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Wheelnav js将标题与圆圈对齐_Javascript_Jquery_Html_Css_Wheelnav.js - Fatal编程技术网

Javascript Wheelnav js将标题与圆圈对齐

Javascript Wheelnav js将标题与圆圈对齐,javascript,jquery,html,css,wheelnav.js,Javascript,Jquery,Html,Css,Wheelnav.js,我正在使用Wheelnav js并试图将每个标题与圆圈内部(红色区域)对齐。但是我遗漏了一些东西,有人能指出我可能遗漏了什么吗。 我需要能够通过鼠标滚动滚动项目,但它也没有发生。(单击菜单时,滚动正在工作) 谢谢 var wheel = new wheelnav("wheelDiv"); wheel.wheelRadius = wheel.wheelRadius * 2;//2 wheel.navItemsContinuous = true; wheel.sliceAngle = 8; whee

我正在使用Wheelnav js并试图将每个标题与圆圈内部(红色区域)对齐。但是我遗漏了一些东西,有人能指出我可能遗漏了什么吗。 我需要能够通过鼠标滚动滚动项目,但它也没有发生。(单击菜单时,滚动正在工作)

谢谢

var wheel = new wheelnav("wheelDiv");
wheel.wheelRadius = wheel.wheelRadius * 2;//2
wheel.navItemsContinuous = true;
wheel.sliceAngle = 8;
wheel.colors = colorpalette.gamebookers;
wheel.slicePathFunction = slicePath().NullSlice;

var anchorAttr = "middle";
wheel.titleFont1 = "200 24px Impact, Charcoal, sans-serif";
wheel.titleFont2 = "200 34px Impact, Charcoal, sans-serif";
wheel.titleAttr = {fill: "#bbb", textAlign: "left", font: wheel.titleFont1,"text-anchor":anchorAttr};
wheel.titleHoverAttr = {font: wheel.titleFont1, cursor: 'pointer',"text-anchor":anchorAttr};
wheel.titleSelectedAttr = { fill: "#000", textAlign: "left", font: wheel.titleFont2,"text-anchor":anchorAttr};

wheel.animatetime = 500;
wheel.animateeffect = 'linear';

wheel.createWheel(["Menu Item -1","Menu - 2","Active Menu Item","Menu - 4","Menu Item - 5","Menu - 6","Active Menu Item","Menu - 8"]);

您可以在initWheel函数之后修改每个navItem的属性。 标题定位可以通过slicePathCustomization实现

wheel.initWheel(["Menu Item -1", "Menu - 2", "Active Menu Item", "Menu - 4", "Menu Item - 5", "Menu - 6", "Active Menu Item", "Menu - 8"]);

//Initial
wheel.sliceInitPathFunction = slicePath().NullSlice;
wheel.navItems[0].sliceInitPathCustom = new slicePathCustomization();
wheel.navItems[0].sliceInitPathCustom.titleRadiusPercent = 0.1;
//Default
wheel.slicePathFunction = slicePath().NullSlice;
wheel.navItems[0].slicePathCustom = new slicePathCustomization();
wheel.navItems[0].slicePathCustom.titleRadiusPercent = 0.2;
//Hover
wheel.sliceHoverPathFunction = slicePath().NullSlice;
wheel.navItems[0].sliceHoverPathCustom = new slicePathCustomization();
wheel.navItems[0].sliceHoverPathCustom.titleRadiusPercent = 0.3;
//Selected
wheel.sliceSelectedPathFunction = slicePath().NullSlice;
wheel.navItems[0].sliceSelectedPathCustom = new slicePathCustomization();
wheel.navItems[0].sliceSelectedPathCustom.titleRadiusPercent = 0.4;

wheel.createWheel();
更多关于定制的信息