This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"application_id": "YOUR_APP_ID", | |
"src": "https://s3.amazonaws.com/img.blitline/filters/boys.jpeg", | |
"functions": [ | |
{ | |
"name": "composite", | |
"params": { | |
"src": "https://s3.amazonaws.com/img.blitline/grad_vignette_index.png" | |
}, | |
"functions": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"application_id":"YOUR_APP_ID", | |
"src":"https://s3.amazonaws.com/dev.blitline/sample.svg", | |
"functions":[ | |
{ | |
"name":"resize_to_fit", | |
"params":{ | |
"width" : 400 | |
}, | |
"save":{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id="app"> | |
<router-view class="view"></router-view> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source: http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/browser-invoke-lambda-function-full.html | |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Emoji Slots</title> | |
<link href="emojislots.css" rel="stylesheet" type="text/css"> | |
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.7.20.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source: http://stackoverflow.com/questions/30904999/grouping-and-ungrouping-fabric-js-objects | |
var canvas = new fabric.Canvas('paper',{ | |
isDrawingMode: true | |
}); | |
$("#select").click(function(){ | |
canvas.isDrawingMode = false; | |
}); | |
$("#draw").click(function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Source: http://stackoverflow.com/questions/32395416/fabric-canvas-font-style-change-after-added | |
HTML | |
_____ | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.5.0/fabric.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<label>Select Font:</label> | |
<select name="FontStyleNumber" id="FontStyleNumber"> | |
<option value="Times New Roman">Times New Roman</option> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Source: | |
HTML | |
_____ | |
<canvas id="c" width="300" height="300"></canvas> | |
CSS | |
_____ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Source: http://stackoverflow.com/questions/33831088/fabric-canvas-make-my-1st-object-always-unselectable?rq=1 | |
//lowest object unselectable | |
var objectx = canvas.getObjects(); | |
objectx[0].selectable = false; | |
//highest object unselectable | |
var objectx = canvas.getObjects(); | |
objectx[objectx.length - 1].selectable = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Source: http://jsfiddle.net/beewayne/z0qn35Lo/ | |
HTMl | |
____ | |
<canvas id="paper" width="400" height="400" style="border:1px solid #ccc"></canvas> | |
<button id="select">Selection mode</button> | |
<button id="draw">Drawing mode</button> | |
<button id="delete">Delete selected object(s)</button> |
OlderNewer