Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,8 @@ In my book, all of these people are ace - I just borrowed from them and spliced
noCanvasMsg: "Your browser doesn't support <canvas> - try Chrome, FF4, Safari or IE9."

// This could be any HTML string (eg. '<label>Draw this shit yo:</label>'):
label: '<p>Please draw the shape in the box to submit the form:</p>'
});
label: '<p>Please draw the shape in the box to submit the form:</p>',

// message position on canvas
isRTL: false
});
13 changes: 12 additions & 1 deletion jquery.motionCaptcha.0.2.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ jQuery.fn.motionCaptcha || (function($) {
ctx.canvasWidth = canvasWidth;
ctx.canvasHeight = canvasHeight;

// msg position
msgX = opts.isRTL?
canvasWidth - 10 : 10;

ctx.textAlign = opts.isRTL?
'right' : 'left';


// Set canvas context font and fillStyle:
ctx.font = opts.canvasFont;
ctx.fillStyle = opts.canvasTextColor;
Expand Down Expand Up @@ -304,7 +312,10 @@ jQuery.fn.motionCaptcha || (function($) {
onError: function($form, $canvas, ctx) {
var opts = this;
return;
}
},

// msg postion (top right or top left)
isRTL: false
};


Expand Down