-
Notifications
You must be signed in to change notification settings - Fork 999
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from iirvine/test_env
Test environment
- Loading branch information
Showing
13 changed files
with
5,811 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
(function() { | ||
function getFiles() { | ||
var memo = {}, | ||
files = [], | ||
i, src; | ||
|
||
function addFiles(srcs) { | ||
for (var j = 0, len = srcs.length; j < len; j++) { | ||
memo[srcs[j]] = true; | ||
} | ||
} | ||
|
||
for (i in deps) { | ||
addFiles(deps[i].src); | ||
} | ||
|
||
for (src in memo) { | ||
files.push(src); | ||
} | ||
|
||
return files; | ||
} | ||
var scripts = getFiles(); | ||
|
||
function getSrcUrl() { | ||
var scripts = document.getElementsByTagName('script'); | ||
for (var i = 0; i < scripts.length; i++) { | ||
var src = scripts[i].src; | ||
if (src) { | ||
var res = src.match(/^(.*)leaflet.draw-include\.js$/); | ||
if (res) { | ||
return res[1] + '../src/'; | ||
} | ||
} | ||
} | ||
} | ||
|
||
var path = getSrcUrl(); | ||
for (var i = 0; i < scripts.length; i++) { | ||
document.writeln("<script src='" + path + scripts[i] + "'></script>"); | ||
} | ||
})(); |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// put after Leaflet files as imagePath can't be detected in a PhantomJS env | ||
L.Icon.Default.imagePath = "../dist/images"; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// set up before Leaflet files to test L#noConflict later | ||
L = 'test'; | ||
|
Oops, something went wrong.