Skip to content

Commit 2d23d4c

Browse files
committed
v8.2.5
1 parent 3874fa1 commit 2d23d4c

File tree

6 files changed

+33
-27
lines changed

6 files changed

+33
-27
lines changed

build/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
const Gleap = window.Gleap;
22

3-
//Gleap.setFrameUrl("http://0.0.0.0:3001");
4-
//Gleap.setApiUrl("http://0.0.0.0:9000");
5-
Gleap.initialize("KProDXhMS0V3UUku2iNnrZ4XsBnAYzxt");
3+
Gleap.setFrameUrl("http://0.0.0.0:3001");
4+
Gleap.setApiUrl("http://0.0.0.0:9000");
5+
Gleap.initialize("ek98ANmHary9PQNG5EIl6TQd3SzqstZA");
66
//Gleap.setEnvironment("dev");
77

88
Gleap.attachCustomData({

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gleap",
3-
"version": "8.2.4",
3+
"version": "8.2.5",
44
"main": "build/index.js",
55
"scripts": {
66
"start": "webpack serve",

published/8.2.5/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

published/latest/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GleapMarkerManager.js

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,30 @@ export default class GleapMarkerManager {
417417
// Capture SVG ref
418418
const captureSVG = document.querySelector(".bb-capture-svg");
419419

420+
const chooseTool = function (type, toolbarItem) {
421+
const toolbarTools = document.querySelectorAll(
422+
".bb-capture-toolbar-item-tool"
423+
);
424+
for (let j = 0; j < toolbarTools.length; j++) {
425+
toolbarTools[j].classList.remove("bb-capture-toolbar-item--active");
426+
}
427+
toolbarItem.classList.add("bb-capture-toolbar-item--active");
428+
self.screenDrawer.setTool(type);
429+
430+
self.dragCursor.innerHTML = "";
431+
if (type === "pointer") {
432+
captureSVG.style.pointerEvents = "none";
433+
} else {
434+
captureSVG.style.pointerEvents = "auto";
435+
try {
436+
var svgClone = toolbarItem.querySelector("svg").cloneNode(true);
437+
if (svgClone && self.dragCursor) {
438+
self.dragCursor.appendChild(svgClone);
439+
}
440+
} catch (exp) { }
441+
}
442+
}
443+
420444
// Setup toolbar items
421445
var toolbarItems = document.querySelectorAll(".bb-capture-toolbar-item");
422446
for (var i = 0; i < toolbarItems.length; i++) {
@@ -436,6 +460,7 @@ export default class GleapMarkerManager {
436460
self.screenRecorder.stopScreenRecording();
437461
} else {
438462
self.screenRecorder.startScreenRecording();
463+
chooseTool(type, document.querySelector(".bb-capture-toolbar-item[data-type='pointer']"));
439464
}
440465
}
441466

@@ -450,27 +475,7 @@ export default class GleapMarkerManager {
450475
type === "rect" ||
451476
type === "pointer"
452477
) {
453-
const toolbarTools = document.querySelectorAll(
454-
".bb-capture-toolbar-item-tool"
455-
);
456-
for (let j = 0; j < toolbarTools.length; j++) {
457-
toolbarTools[j].classList.remove("bb-capture-toolbar-item--active");
458-
}
459-
toolbarItem.classList.add("bb-capture-toolbar-item--active");
460-
self.screenDrawer.setTool(type);
461-
462-
self.dragCursor.innerHTML = "";
463-
if (type === "pointer") {
464-
captureSVG.style.pointerEvents = "none";
465-
} else {
466-
captureSVG.style.pointerEvents = "auto";
467-
try {
468-
var svgClone = toolbarItem.querySelector("svg").cloneNode(true);
469-
if (svgClone && self.dragCursor) {
470-
self.dragCursor.appendChild(svgClone);
471-
}
472-
} catch (exp) { }
473-
}
478+
chooseTool(type, toolbarItem);
474479
}
475480
if (type === "colorpicker") {
476481
if (colorpicker.style.display === "flex") {

0 commit comments

Comments
 (0)