1 line
7.4 KiB
JSON
1 line
7.4 KiB
JSON
{"ast":null,"code":"/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\n\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\n\n/**\r\n * Traverse the tree from bottom to top and do something\r\n */\nfunction eachAfter(root, callback, separation) {\n var nodes = [root];\n var next = [];\n var node;\n\n while (node = nodes.pop()) {\n // jshint ignore:line\n next.push(node);\n\n if (node.isExpand) {\n var children = node.children;\n\n if (children.length) {\n for (var i = 0; i < children.length; i++) {\n nodes.push(children[i]);\n }\n }\n }\n }\n\n while (node = next.pop()) {\n // jshint ignore:line\n callback(node, separation);\n }\n}\n/**\r\n * Traverse the tree from top to bottom and do something\r\n */\n\n\nfunction eachBefore(root, callback) {\n var nodes = [root];\n var node;\n\n while (node = nodes.pop()) {\n // jshint ignore:line\n callback(node);\n\n if (node.isExpand) {\n var children = node.children;\n\n if (children.length) {\n for (var i = children.length - 1; i >= 0; i--) {\n nodes.push(children[i]);\n }\n }\n }\n }\n}\n\nexport { eachAfter, eachBefore };","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/chart/tree/traversalHelper.js"],"names":["eachAfter","root","callback","separation","nodes","next","node","pop","push","isExpand","children","length","i","eachBefore"],"mappings":"AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAASA,SAAT,CAAmBC,IAAnB,EAAyBC,QAAzB,EAAmCC,UAAnC,EAA+C;AAC7C,MAAIC,KAAK,GAAG,CAACH,IAAD,CAAZ;AACA,MAAII,IAAI,GAAG,EAAX;AACA,MAAIC,IAAJ;;AAEA,SAAOA,IAAI,GAAGF,KAAK,CAACG,GAAN,EAAd,EAA2B;AACzB;AACAF,IAAAA,IAAI,CAACG,IAAL,CAAUF,IAAV;;AAEA,QAAIA,IAAI,CAACG,QAAT,EAAmB;AACjB,UAAIC,QAAQ,GAAGJ,IAAI,CAACI,QAApB;;AAEA,UAAIA,QAAQ,CAACC,MAAb,EAAqB;AACnB,aAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGF,QAAQ,CAACC,MAA7B,EAAqCC,CAAC,EAAtC,EAA0C;AACxCR,UAAAA,KAAK,CAACI,IAAN,CAAWE,QAAQ,CAACE,CAAD,CAAnB;AACD;AACF;AACF;AACF;;AAED,SAAON,IAAI,GAAGD,IAAI,CAACE,GAAL,EAAd,EAA0B;AACxB;AACAL,IAAAA,QAAQ,CAACI,IAAD,EAAOH,UAAP,CAAR;AACD;AACF;AACD;AACA;AACA;;;AAGA,SAASU,UAAT,CAAoBZ,IAApB,EAA0BC,QAA1B,EAAoC;AAClC,MAAIE,KAAK,GAAG,CAACH,IAAD,CAAZ;AACA,MAAIK,IAAJ;;AAEA,SAAOA,IAAI,GAAGF,KAAK,CAACG,GAAN,EAAd,EAA2B;AACzB;AACAL,IAAAA,QAAQ,CAACI,IAAD,CAAR;;AAEA,QAAIA,IAAI,CAACG,QAAT,EAAmB;AACjB,UAAIC,QAAQ,GAAGJ,IAAI,CAACI,QAApB;;AAEA,UAAIA,QAAQ,CAACC,MAAb,EAAqB;AACnB,aAAK,IAAIC,CAAC,GAAGF,QAAQ,CAACC,MAAT,GAAkB,CAA/B,EAAkCC,CAAC,IAAI,CAAvC,EAA0CA,CAAC,EAA3C,EAA+C;AAC7CR,UAAAA,KAAK,CAACI,IAAN,CAAWE,QAAQ,CAACE,CAAD,CAAnB;AACD;AACF;AACF;AACF;AACF;;AAED,SAASZ,SAAT,EAAoBa,UAApB","sourcesContent":["\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\n\r\n\r\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\r\n\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\n\r\n/**\r\n * Traverse the tree from bottom to top and do something\r\n */\r\nfunction eachAfter(root, callback, separation) {\r\n var nodes = [root];\r\n var next = [];\r\n var node;\r\n\r\n while (node = nodes.pop()) {\r\n // jshint ignore:line\r\n next.push(node);\r\n\r\n if (node.isExpand) {\r\n var children = node.children;\r\n\r\n if (children.length) {\r\n for (var i = 0; i < children.length; i++) {\r\n nodes.push(children[i]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n while (node = next.pop()) {\r\n // jshint ignore:line\r\n callback(node, separation);\r\n }\r\n}\r\n/**\r\n * Traverse the tree from top to bottom and do something\r\n */\r\n\r\n\r\nfunction eachBefore(root, callback) {\r\n var nodes = [root];\r\n var node;\r\n\r\n while (node = nodes.pop()) {\r\n // jshint ignore:line\r\n callback(node);\r\n\r\n if (node.isExpand) {\r\n var children = node.children;\r\n\r\n if (children.length) {\r\n for (var i = children.length - 1; i >= 0; i--) {\r\n nodes.push(children[i]);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport { eachAfter, eachBefore };"]},"metadata":{},"sourceType":"module"} |