From eb69ea6808b277232be06f3892fb2cbdeb5b917c Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Mon, 9 Sep 2019 19:04:07 +0200 Subject: [PATCH] Fix lint --- lib/extension/networkMap.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/extension/networkMap.js b/lib/extension/networkMap.js index 3fafd442..d3fdfd12 100644 --- a/lib/extension/networkMap.js +++ b/lib/extension/networkMap.js @@ -38,8 +38,8 @@ class NetworkMap { onMQTTMessage(topic, message) { message = message.toString(); const includeRoutes = (topic === this.topicRoutes) ? 1: 0; - if ((topic === this.topic || topic === this.topicRoutes) - && this.supportedFormats.hasOwnProperty(message)) { + if ((topic === this.topic || topic === this.topicRoutes) && + this.supportedFormats.hasOwnProperty(message)) { this.zigbee.networkScan(includeRoutes, (result)=> { const converted = this.supportedFormats[message](this.zigbee, result); this.mqtt.publish(`bridge/networkmap/${message}`, converted, {}); @@ -110,8 +110,8 @@ class NetworkMap { devStyle = `style="rounded, filled", fillcolor="${colors.fill.router}", ` + `fontcolor="${colors.font.router}"`; } else { - devStyle = `style="rounded, dashed, filled", fillcolor="${colors.fill.enddevice}", ` - + `fontcolor="${colors.font.enddevice}"`; + devStyle = `style="rounded, dashed, filled", fillcolor="${colors.fill.enddevice}", ` + + `fontcolor="${colors.font.enddevice}"`; } // Add the device with its labels to the graph as a node. @@ -124,13 +124,13 @@ class NetworkMap { */ topology.links.filter((e) => (e.sourceIeeeAddr === device.ieeeAddr) || (e.SourceNwkAddr === device.nwkAddr)) .forEach((e) => { - const lineStyle = (device.type=='EndDevice') ? 'penwidth=1, ' - : (!e.routes.length) ? 'penwidth=0.5, ' : 'penwidth=2, '; - const lineWeight = (!e.routes.length) ? `weight=0, color="${colors.line.inactive}", ` - : `weight=1, color="${colors.line.active}", `; + const lineStyle = (device.type=='EndDevice') ? 'penwidth=1, ' : (!e.routes.length) ? + 'penwidth=0.5, ' : 'penwidth=2, '; + const lineWeight = (!e.routes.length) ? `weight=0, color="${colors.line.inactive}", ` : + `weight=1, color="${colors.line.active}", `; const textRoutes = e.routes.map((r) => `0x${r.toString(16)}`); - const lineLabels = (!e.routes.length) ? `label="${e.lqi}"` - : `label="${e.lqi}\\n[${textRoutes.join(']\\n[')}]"`; + const lineLabels = (!e.routes.length) ? `label="${e.lqi}"` : + `label="${e.lqi}\\n[${textRoutes.join(']\\n[')}]"`; text += ` "${device.ieeeAddr}" -> "${e.targetIeeeAddr}"`; text += ` [${lineStyle}${lineWeight}${lineLabels}]\n`; });