Press and drag to make wind the lion will surely appreciate
A Pen by James Freund on CodePen.
Press and drag to make wind the lion will surely appreciate
A Pen by James Freund on CodePen.
A title that gives the appearance of floating in the ocean
Original code base from Manuel Ro's codepen
A Pen by James Freund on CodePen.
| var convertOptions = function (obj) { | |
| var temp = []; | |
| var tempFunctionArray = []; | |
| // Pre Create | |
| if (obj.preCreate !== undefined) { | |
| temp = obj.preCreate.split(','); | |
| tempFunctionArray = []; | |
| for (var i = 0; i < temp.length; i++) { | |
| tempFunctionArray.push(function_array[temp[i]]); |
| var function_array = { | |
| // sets the dates for creation of a new document | |
| "setDateTimes" : function (req, res, next) { | |
| var tempDate = new Date().toISOString(); | |
| req.body.created_date = tempDate; | |
| req.body.updated_date = tempDate; | |
| next(); | |
| }, | |
| // sets the created by and updated by for creation of a new document |
| { | |
| "name": "flare", | |
| "children": [{ | |
| "name": "analytics", | |
| "children": [{ | |
| "name": "cluster", | |
| "children": [{ | |
| "name": "AgglomerativeCluster", | |
| "size": 3938 | |
| }, { |
| [ | |
| [{ | |
| "label": "Data Analytics/ Databases", | |
| "id": -32, | |
| "department": "IT", | |
| "parent": null | |
| }, { | |
| "label": "Data Infrastructure", | |
| "id": -43, | |
| "department": "IT", |
| buildJson(function (data) { | |
| // Calculate total nodes, max label length | |
| var totalNodes = 0; | |
| var maxLabelLength = 0; | |
| // variables for drag/drop | |
| var selectedNode = null; | |
| var draggingNode = null; | |
| // panning variables | |
| var panSpeed = 200; |
| objArray.sort(function(a, b) { | |
| var textA = a.DepartmentName.toUpperCase(); | |
| var textB = b.DepartmentName.toUpperCase(); | |
| return (textA < textB) ? -1 : (textA > textB) ? 1 : 0; | |
| }); |
| const getAsyncImport = async () => { | |
| try { | |
| const dynamicThing = 'faCoffee'; | |
| const something = await import(`/${dynamicThing}`); | |
| console.log(something); | |
| } catch (error) { | |
| alert('it did not import properly!'); | |
| } | |
| }; |
| /** | |
| * @license | |
| * Copyright (c) 2020 ServiceNow, Inc. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to | |
| * deal in the Software without restriction, including without limitation the | |
| * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| * sell copies of the Software, and to permit persons to whom the Software is | |
| * furnished to do so, subject to the following conditions: |