Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
normalize urls so design url an preview url are similar
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed Jun 18, 2014
1 parent c3b9c8d commit 13554ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion elements/design-frame/design-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@
},

'import': function(urls, callback) {
Polymer.import(urls, callback);
/* normalize metadata imports to our expectation that the design space
is inside a component folder */
var imports = urls.map(function(u) {
return u.replace('components/', '../');
});
Polymer.import(imports, callback);
}

});
Expand Down
8 changes: 4 additions & 4 deletions elements/designer-element/frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<html>
<head>
<title>Polymer Designer</title>
<!-- normalize url to be same as designer -->
<base href="../../">
<script src="components/platform/platform.js"></script>
<!-- normalize url to be same as preview -->
<base href="../../components/element/">
<script src="../platform/platform.js"></script>
<script>
window.parent.postMessage('designer-loading', location.href);
</script>

<link rel="import" href="elements/design-frame/design-frame.html">
<link rel="import" href="../../elements/design-frame/design-frame.html">

<style>

Expand Down

0 comments on commit 13554ba

Please sign in to comment.