Help Implementation
This commit is contained in:
1 parent
c174ae57b1
commit
35e41271ed
8 files changed
+47
-14
No files matched your search
@@ -49,7 +49,7 @@ function newCircularMenu () {
|
||||
|
||||
let iconAndTextArray = []
|
||||
let iconOnlyArray
|
||||
let ringsArray = [[], [], []]
|
||||
let ringsArray = [[], [], [], []]
|
||||
|
||||
for (let i = 0; i < menuItemsInitialValues.length; i++) {
|
||||
let menuItem = newCircularMenuItem()
|
||||
@@ -103,15 +103,18 @@ function newCircularMenu () {
|
||||
menuItems.push(menuItem)
|
||||
}
|
||||
|
||||
/* There are 3 possible rings of icons, we will go through each of them here. */
|
||||
let amplitudeArray = [80, 50, 40]
|
||||
let initialAngleArray = [220, 205, 200]
|
||||
for (let j = 1; j < 4; j++) {
|
||||
/* There are 4 possible rings of icons, we will go through each of them here. */
|
||||
let amplitudeArray = [80, 50, 40, 80]
|
||||
let initialAngleArray = [220, 205, 200, 180]
|
||||
for (let j = 1; j < ringsArray.length + 1; j++) {
|
||||
let iconOnlyArray = ringsArray[j - 1]
|
||||
/* Here we calculate the angles for each menu item, and then apply it if it was not previously defined. */
|
||||
let amplitude = amplitudeArray[j - 1]
|
||||
let initialAngle = initialAngleArray[j - 1]
|
||||
let step = amplitude / (iconOnlyArray.length - 1)
|
||||
if (iconOnlyArray.length === 1) {
|
||||
step = 0
|
||||
}
|
||||
|
||||
for (let i = 0; i < iconOnlyArray.length; i++) {
|
||||
let menuItem = iconOnlyArray[i]
|
||||
|
||||
Reference in new issue
Block a user