Skip to content

Commit

Permalink
fix editor for mobile devices
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtnbroder committed Oct 22, 2014
1 parent e63528b commit 7fa21d1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
3 changes: 3 additions & 0 deletions public/coffeescript/base/base.controller.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ module.exports = app.controller 'Base',
$rootScope.editor.getSession().setUseWrapMode(true)
$rootScope.editor.setShowPrintMargin(false)
$rootScope.editor.getSession().setValue($scope.currentDocument.body)
$rootScope.editor.setOption('maxLines', 90000)

window.editor = $rootScope.editor

updateDocument = ->
$scope.currentDocument = documentsService.getCurrentDocument()
Expand Down
2 changes: 1 addition & 1 deletion public/css/app.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/scss/foundation/_tools.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

.mnone {
margin: 0;
// height: 100%;
}

.sr-only {
Expand Down
16 changes: 9 additions & 7 deletions public/scss/structures/_split.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,19 @@
// .split-scaffolding

&-editor {
position: relative;
height: calc(100vh - 100px);
// position: relative;
// height: 100%;
padding-left: 0;
padding-right: 0;
z-index: map-get($z-index, editor);

.show-preview & {
display: none;
}

@include from('tablet') {
padding-right: 16px;
float: left;
width: 50%;

.show-preview & {
display: block;
Expand All @@ -62,7 +63,7 @@
&-preview {
display: none;
position: absolute;
top: 122px;
top: 129px;
background-color: #FFF;
z-index: map-get($z-index, preview);

Expand All @@ -71,11 +72,12 @@
}

@include from('tablet') {
height: calc(100vh - 100px);
border-left: 1px solid $c-border;
top: 0;
position: relative;
position: static;
display: block;
float: right;
top: 0;
width: 50%;
}
}
}

0 comments on commit 7fa21d1

Please sign in to comment.