Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
52675f5b
Commit
52675f5b
authored
Sep 07, 2015
by
d11e9
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix resize, must be called after editor is setup
parent
b945edd9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
16 deletions
+19
-16
index.html
index.html
+19
-16
No files found.
index.html
View file @
52675f5b
...
@@ -257,7 +257,26 @@ input[readonly] {
...
@@ -257,7 +257,26 @@ input[readonly] {
// ----------------- editor ----------------------
var
SOL_CACHE_KEY
=
"sol-cache"
;
var
editor
=
ace
.
edit
(
"input"
);
var
session
=
editor
.
getSession
();
var
Range
=
ace
.
require
(
'ace/range'
).
Range
;
var
errMarkerId
=
null
;
var
solCache
=
window
.
localStorage
.
getItem
(
SOL_CACHE_KEY
);
editor
.
setValue
(
solCache
||
BALLOT_EXAMPLE
,
1
);
session
.
setMode
(
"ace/mode/javascript"
);
session
.
setTabSize
(
4
);
session
.
setUseSoftTabs
(
true
);
// ----------------- resizeable ui ---------------
// ----------------- resizeable ui ---------------
var
EDITOR_SIZE_CACHE_KEY
=
"editor-size-cache"
;
var
EDITOR_SIZE_CACHE_KEY
=
"editor-size-cache"
;
var
dragging
=
false
;
var
dragging
=
false
;
$
(
'#dragbar'
).
mousedown
(
function
(
e
){
$
(
'#dragbar'
).
mousedown
(
function
(
e
){
...
@@ -298,22 +317,6 @@ input[readonly] {
...
@@ -298,22 +317,6 @@ input[readonly] {
// set cached defaults
// set cached defaults
var
cachedSize
=
window
.
localStorage
.
getItem
(
EDITOR_SIZE_CACHE_KEY
);
var
cachedSize
=
window
.
localStorage
.
getItem
(
EDITOR_SIZE_CACHE_KEY
);
if
(
cachedSize
)
setEditorSize
(
cachedSize
);
if
(
cachedSize
)
setEditorSize
(
cachedSize
);
// ----------------- editor ----------------------
var
SOL_CACHE_KEY
=
"sol-cache"
;
var
editor
=
ace
.
edit
(
"input"
);
var
session
=
editor
.
getSession
();
var
Range
=
ace
.
require
(
'ace/range'
).
Range
;
var
errMarkerId
=
null
;
var
solCache
=
window
.
localStorage
.
getItem
(
SOL_CACHE_KEY
);
editor
.
setValue
(
solCache
||
BALLOT_EXAMPLE
,
1
);
session
.
setMode
(
"ace/mode/javascript"
);
session
.
setTabSize
(
4
);
session
.
setUseSoftTabs
(
true
);
// ----------------- editor resize ---------------
// ----------------- editor resize ---------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment