File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ function initCodeEditor() {
4646 }
4747 aceEditor . setValue ( $ ( '#editor' ) . val ( ) ) ;
4848 aceEditor . clearSelection ( ) ;
49- aceEditor . moveCursorTo ( 0 , 0 ) ;
49+ aceEditor . moveCursorTo ( 0 , 0 ) ;
5050}
5151
5252//初始化编辑器以及预览内容
@@ -100,12 +100,9 @@ function run() {
100100function loadPreview ( content ) {
101101 var iFrame = document . getElementById ( "innerPage" ) . contentWindow ;
102102 iFrame . document . open ( ) ;
103+ iFrame . addEventListener ( "load" , mapHeight ) ;
103104 iFrame . document . write ( content ) ;
104105 iFrame . document . close ( ) ;
105- iFrame . onload = function ( ) {
106- mapHeight ( ) ;
107- } ;
108-
109106}
110107
111108/**设置显示源码的拖拽效果**/
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ function createGalleryChart(example) {
7979
8080 var chartDiv = $ ( "<div class='col-lg-2 col-md-4 col-sm-6'></div>" ) ;
8181 var chart = $ ( "<div class='chart'></div>" ) ;
82- var link = $ ( "<a class='chart-link' target='_new ' href='" + target + "#" + href + "'></a>" ) ;
82+ var link = $ ( "<a class='chart-link' target='_blank ' href='" + target + "#" + href + "'></a>" ) ;
8383 var chartTitle = $ ( "<h5 class='chart-title'>" + title + "</h5>" ) ;
8484 var thumb = $ ( "<img class='chart-area' src='" + thumbnail + "' style='display: inline;'>" ) ;
8585
You can’t perform that action at this time.
0 commit comments