canvas-designer
Advanced tools
Comparing version 1.2.9 to 1.3.0
{ | ||
"name": "canvas-designer", | ||
"preferGlobal": false, | ||
"version": "1.2.9", | ||
"version": "1.3.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Muaz Khan", |
@@ -216,4 +216,12 @@ // _______________ | ||
designer.renderStream = function() { | ||
if (!designer.iframe) return; | ||
designer.postMessage({ | ||
renderStream: true | ||
}); | ||
}; | ||
designer.widgetHtmlURL = 'widget.html'; | ||
designer.widgetJsURL = 'widget.min.js'; | ||
} |
@@ -29,33 +29,5 @@ var webrtcHandler = { | ||
this.peer.setRemoteDescription(new RTCSessionDescription(sdp)).then(function() { | ||
var arr = ["line", [139, 261, 170, 219], | ||
[1, "rgba(0,0,0,0)", "rgba(0,0,0,0)", 1, "source-over", "round", "round", "15px \"Arial\""] | ||
]; | ||
points.push(arr); | ||
drawHelper.redraw(); | ||
setTimeout(function() { | ||
setSelection(document.getElementById('line'), 'Line'); | ||
}, 1000); | ||
setTimeout(function() { | ||
var toolBox = document.getElementById('tool-box'); | ||
var canvasElements = toolBox.getElementsByTagName('canvas'); | ||
var shape = window.selectedIcon.toLowerCase(); | ||
var firstMatch; | ||
for (var i = 0; i < canvasElements.length; i++) { | ||
if (!firstMatch && (canvasElements[i].id || '').indexOf(shape) !== -1) { | ||
firstMatch = canvasElements[i]; | ||
} | ||
} | ||
if (!firstMatch) { | ||
window.selectedIcon = 'Pencil'; | ||
firstMatch = document.getElementById('pencil-icon'); | ||
} | ||
setSelection(firstMatch, window.selectedIcon); | ||
points.length = points.length - 1; | ||
drawHelper.redraw(); | ||
}, 2000); | ||
if (typeof setTemporaryLine === 'function') { | ||
setTemporaryLine(); | ||
} | ||
}); | ||
@@ -62,0 +34,0 @@ }, |
{ | ||
"name": "canvas-designer", | ||
"preferGlobal": false, | ||
"version": "1.2.9", | ||
"version": "1.3.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Muaz Khan", |
@@ -247,2 +247,10 @@ # [Canvas Designer](https://github.com/muaz-khan/Canvas-Designer) / [API Referencee](https://github.com/muaz-khan/Canvas-Designer#api-reference) | ||
## `renderStream` | ||
Call this method internally to fix video rendering issues. | ||
```javascript | ||
designer.renderStream(); | ||
``` | ||
## `addSyncListener` | ||
@@ -249,0 +257,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
687
543448
4837