Skip to content

Commit

Permalink
RecordRTC, PluginRTC, RTCMultiConnection, Chrome-Extensions and Canva…
Browse files Browse the repository at this point in the history
…s-Designer updated.
  • Loading branch information
muaz-khan committed Feb 12, 2015
1 parent 8388987 commit 6257206
Show file tree
Hide file tree
Showing 80 changed files with 4,823 additions and 2,887 deletions.
3 changes: 2 additions & 1 deletion Canvas-Designer/decorator.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function setSelection(element, prop) {
else is.set('Pencil');

addEvent(context.canvas, 'click', function() {

dragHelper.global.startingIndex = 0;

setSelection(this, shape);
Expand Down Expand Up @@ -108,7 +109,7 @@ function setSelection(element, prop) {
strokeStyle = 'White';
fillStyle = 'White';
lineWidth = 10;
} else if (cache.strokeStyle && cache.fillStyle && cache.lineWidth) {
} else if (cache.strokeStyle && cache.fillStyle && typeof cache.lineWidth !== 'undefined') {
strokeStyle = cache.strokeStyle;
fillStyle = cache.fillStyle;
lineWidth = cache.lineWidth;
Expand Down
2 changes: 1 addition & 1 deletion Canvas-Designer/draw-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var drawHelper = {

text: function (context, point, options) {
var oldFillStyle = fillStyle;
context.fillStyle = fillStyle == 'transparent' ? 'Black' : fillStyle;
context.fillStyle = fillStyle === 'transparent' || fillStyle === 'White' ? 'Black' : fillStyle;
context.font = '15px Verdana';
context.fillText(point[0].substr(1, point[0].length - 2), point[1], point[2]);
fillStyle = oldFillStyle;
Expand Down
2 changes: 0 additions & 2 deletions Canvas-Designer/eraser-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ var eraserHandler = {
// make sure that pencil is drawing shapes even
// if mouse is down but mouse isn't moving
tempContext.lineCap = 'round';
// tempContext.fillStyle = 'yellow';
drawHelper.line(tempContext, [t.prevX, t.prevY, x, y]);

// points[points.length] = ["2", "#ecfa45", "#000000", "1", "source-over", "butt", "miter"];
points[points.length] = ['line', [t.prevX, t.prevY, x, y], drawHelper.getOptions()];

t.prevX = x;
Expand Down
6 changes: 5 additions & 1 deletion Canvas-Designer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ <h2>Select Icons</h2>
<input type="checkbox" id="pencil" checked>
<label for="pencil">pencil</label><br>

<input type="checkbox" id="eraser" checked>
<label for="eraser">eraser</label><br>

<input type="checkbox" id="text" checked>
<label for="text">text</label><br>

Expand Down Expand Up @@ -149,7 +152,8 @@ <h2>How to use in your own site?</h2>

CanvasDesigner.setTools({
pencil: true,
text: true
text: true,
eraser: true
});

CanvasDesigner.appendTo(document.getElementById('widget-container'));
Expand Down
4 changes: 4 additions & 0 deletions Canvas-Designer/text-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ textInput.onkeyup = function(e) {
textInput.onblur = function(e) {
if (textInput.value.length) {
fillText();
return;
}
//textInput.style.top = '-100000px';
//textInput.style.left = '-100000px';
//textHandler.isTextPending = false;
};

function fillText() {
Expand Down
Loading

0 comments on commit 6257206

Please sign in to comment.