Skip to content

Commit 420cce4

Browse files
committed
优化例子resources问题 缩小缩略图
1 parent 484b285 commit 420cce4

11 files changed

+9
-7
lines changed

examples/js/editor.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
$(document).ready(function () {
2+
window.initI18N(function(){
23
initPage();
34
bindEvents();
45
sidebarScrollFix();
56
});
7+
});
68

79
var aceEditor;
810
var containExamples = true;
@@ -11,7 +13,6 @@ function initPage() {
1113
initSideBar();
1214
initEditor();
1315
screenResize();
14-
Localization.localize();
1516
}
1617

1718
function initSideBar() {
@@ -102,7 +103,7 @@ function run() {
102103
function loadPreview(content) {
103104
var iFrame = createIFrame(),
104105
iframeDocument = iFrame.contentWindow.document;
105-
106+
iFrame.contentWindow.resources=window.resources?window.resources.resources:{};
106107
iframeDocument.open();
107108
iframeDocument.write(content);
108109
iframeDocument.close();

examples/js/example.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
$(document).ready(function () {
2+
window.initI18N(function(){
23
initPage();
34
bindEvents();
45
//懒加载
56
var timeout = setTimeout(function () {
67
$("img.chart-thumb").lazyload();
78
}, 1000);
89
});
10+
});
911

1012

1113
var exConfig = exampleConfig,

examples/js/plottingPanel/StylePanel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ L.supermap.plotting.initStylePanel = function(div, serverUrl, editControl){
4343

4444
function afterModifySelectFeature(rowIndex, rowData, changes){
4545
var updated = $('#pg').propertygrid('getChanges', "updated");
46-
new Promise((resolve,reject)=> {
46+
new Promise(function(resolve,reject) {
4747
if(updated.length !== 0) {
4848
updateSelectFeature(updated[0], selectFeatures, serverUrl);
4949
}
@@ -54,7 +54,7 @@ L.supermap.plotting.initStylePanel = function(div, serverUrl, editControl){
5454
}
5555
$('#pg').propertygrid('loadData', collectionPropertyGridRows(selectFeatures));
5656
return;
57-
}).then((selectFeatures) => {
57+
}).then(function(selectFeatures) {
5858
for(var i = 0; i < selectFeatures.length; i++){
5959
if(selectFeatures[i].graphic){
6060
selectFeatures[i].graphic.updateImage();
-2.36 MB
Loading
-2.76 MB
Loading
-1.69 MB
Loading
-22.4 MB
Loading
-2.83 MB
Loading

examples/leaflet/plot_dynamicPlot.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
</li>
165165
</div>
166166
<div id="contentMe" style="width:100px;background-color:#f4f4f4;box-shadow:3px 3px 3px rgba(0,0,0,0.5);position:absolute;z-index:1000; top:20px;left:100px;display:none;text-align:center;">
167-
<a href="javascript:void(0)" id="paste" style="border-bottom:1px solid #ccc;display:block;line-height:20px;color:#000; font-size:16px;">粘贴此处</a></a>
167+
<a href="javascript:void(0)" id="paste" style="border-bottom:1px solid #ccc;display:block;line-height:20px;color:#000; font-size:16px;">粘贴此处</a>
168168
</div>
169169
<script type="text/javascript" include="bootstrap,responsive,sticklr,plottingPanel" src="../js/include-web.js"></script>
170170
<script type="text/javascript" include="iclient9-plot-leaflet" src="../../dist/leaflet/include-leaflet.js"></script>

examples/leaflet/plot_symbolEditor.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h5 class='panel-title text-center'>编辑器</h5></div>
1616
</div>
1717
<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
1818
<div id="contentMe" style="width:100px;background-color:#f4f4f4;box-shadow:3px 3px 3px rgba(0,0,0,0.5);position:absolute;z-index:1000; top:20px;left:100px;display:none;text-align:center;">
19-
<a href="javascript:void(0)" id="paste" style="border-bottom:1px solid #ccc;display:block;line-height:20px;color:#000; font-size:16px;">粘贴此处</a></a>
19+
<a href="javascript:void(0)" id="paste" style="border-bottom:1px solid #ccc;display:block;line-height:20px;color:#000; font-size:16px;">粘贴此处</a>
2020
</div>
2121
<script type="text/javascript" include="bootstrap-css" src="../js/include-web.js"></script>
2222
<script type="text/javascript" include="iclient9-plot-leaflet" src="../../dist/leaflet/include-leaflet.js"></script>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy