Skip to content

Commit

Permalink
v8.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
boehlerlukas committed Nov 8, 2022
1 parent 3874fa1 commit 2d23d4c
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 27 deletions.
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions demo/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const Gleap = window.Gleap;

//Gleap.setFrameUrl("http://0.0.0.0:3001");
//Gleap.setApiUrl("http://0.0.0.0:9000");
Gleap.initialize("KProDXhMS0V3UUku2iNnrZ4XsBnAYzxt");
Gleap.setFrameUrl("http://0.0.0.0:3001");
Gleap.setApiUrl("http://0.0.0.0:9000");
Gleap.initialize("ek98ANmHary9PQNG5EIl6TQd3SzqstZA");
//Gleap.setEnvironment("dev");

Gleap.attachCustomData({
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gleap",
"version": "8.2.4",
"version": "8.2.5",
"main": "build/index.js",
"scripts": {
"start": "webpack serve",
Expand Down
1 change: 1 addition & 0 deletions published/8.2.5/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion published/latest/index.js

Large diffs are not rendered by default.

47 changes: 26 additions & 21 deletions src/GleapMarkerManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,30 @@ export default class GleapMarkerManager {
// Capture SVG ref
const captureSVG = document.querySelector(".bb-capture-svg");

const chooseTool = function (type, toolbarItem) {
const toolbarTools = document.querySelectorAll(
".bb-capture-toolbar-item-tool"
);
for (let j = 0; j < toolbarTools.length; j++) {
toolbarTools[j].classList.remove("bb-capture-toolbar-item--active");
}
toolbarItem.classList.add("bb-capture-toolbar-item--active");
self.screenDrawer.setTool(type);

self.dragCursor.innerHTML = "";
if (type === "pointer") {
captureSVG.style.pointerEvents = "none";
} else {
captureSVG.style.pointerEvents = "auto";
try {
var svgClone = toolbarItem.querySelector("svg").cloneNode(true);
if (svgClone && self.dragCursor) {
self.dragCursor.appendChild(svgClone);
}
} catch (exp) { }
}
}

// Setup toolbar items
var toolbarItems = document.querySelectorAll(".bb-capture-toolbar-item");
for (var i = 0; i < toolbarItems.length; i++) {
Expand All @@ -436,6 +460,7 @@ export default class GleapMarkerManager {
self.screenRecorder.stopScreenRecording();
} else {
self.screenRecorder.startScreenRecording();
chooseTool(type, document.querySelector(".bb-capture-toolbar-item[data-type='pointer']"));
}
}

Expand All @@ -450,27 +475,7 @@ export default class GleapMarkerManager {
type === "rect" ||
type === "pointer"
) {
const toolbarTools = document.querySelectorAll(
".bb-capture-toolbar-item-tool"
);
for (let j = 0; j < toolbarTools.length; j++) {
toolbarTools[j].classList.remove("bb-capture-toolbar-item--active");
}
toolbarItem.classList.add("bb-capture-toolbar-item--active");
self.screenDrawer.setTool(type);

self.dragCursor.innerHTML = "";
if (type === "pointer") {
captureSVG.style.pointerEvents = "none";
} else {
captureSVG.style.pointerEvents = "auto";
try {
var svgClone = toolbarItem.querySelector("svg").cloneNode(true);
if (svgClone && self.dragCursor) {
self.dragCursor.appendChild(svgClone);
}
} catch (exp) { }
}
chooseTool(type, toolbarItem);
}
if (type === "colorpicker") {
if (colorpicker.style.display === "flex") {
Expand Down

0 comments on commit 2d23d4c

Please sign in to comment.