Skip to content

Instantly share code, notes, and snippets.

View alalonde's full-sized avatar

Alec LaLonde alalonde

View GitHub Profile
function AttachmentCtrl($scope, $location, $timeout, Docs) {
$(function() {
$('#detail-form-doc').fileupload({
dataType: 'json',
url: '/angular-ib/app/fileupload?id=' + $location.search().id,
add: function(e, data) {
$scope.$apply(function(scope) {
// Turn the FileList object into an Array
for (var i = 0; i < data.files.length; i++) {
$scope.project.files.push(data.files[i]);
@alalonde
alalonde / TileLayer.TileJSON.js
Created May 10, 2012 23:52 — forked from DGuidi/TileLayer.TileJSON.js
Leaflet TileCanvas -- Using x/y/z rather than bounding box for URLs
L.TileLayer.TileJSON = L.TileLayer.Canvas.extend({
options: {
debug: false
},
tileSize: 256,
initialize: function (options) {
L.Util.setOptions(this, options);