I’m wondering if there is a way to setup multiple instances of measure
Maybe is not possible thorugh the UI itself, but I’m sure the developers can point me in the right direction on how to do this.
This is unfortunately not possible through the UI of DevTools.
I’m curious though. Why do you want that to be possible? Interested in understanding if this would be useful to others.
Even by running code, that wouldn’t work I think. You could request several instances of the tool by running code from Scratchpad for example. But everytime you click on the page, all of them will reset their current selection. So you wouldn’t be able to draw several selections at once.
Anyway, in scratchpad (Shift+F4) you can do this:
/* -sp-context:browser */
var { devtools } = Cu.import("resource://devtools/shared/Loader.jsm", {});
var { require } = devtools;
var { gDevTools } = require("devtools/client/framework/devtools");
var t = [...gDevTools._toolboxes][0][1];
var w = t.walker;
async function addMeasuringTool() {
const h = await t.highlighterUtils.getHighlighterByType("MeasuringToolHighlighter");
await h.show(w.rootNode);
}
// Add one instance
addMeasuringTool();
// Add another ...
For what it’s worth, I requested that some time ago in bug 1416218 .
Allowing to create multiple measure areas makes it easy to compare the measurements.
Sebastian