瀏覽代碼

move the changed indicator on top of the editor textarea

so that you can actually see it.
Lucas Stadler 10 年之前
父節點
當前提交
f207d0a79b
共有 2 個文件被更改,包括 8 次插入0 次删除
  1. 2 0
      glsl/files.js
  2. 6 0
      glsl/raymarching.js

+ 2 - 0
glsl/files.js

@ -103,6 +103,7 @@ files.setupUI = function(editorEl) {
103 103
  }
104 104
105 105
  var nameEl = document.createElement("input");
106
  nameEl.id = "editor-name";
106 107
  nameEl.value = files.current;
107 108
  nameEl.maxlength = 20;
108 109
  nameEl.placeholder = "Name of the shader";
@ -145,6 +146,7 @@ files.setupUI = function(editorEl) {
145 146
  });
146 147
147 148
  var changeEl = document.createElement("span");
149
  changeEl.id = "editor-changed";
148 150
  
149 151
  editorEl.addEventListener("keydown", function(ev) {
150 152
    if (ev.ctrlKey && ev.keyCode == 83) { // Ctrl-s

+ 6 - 0
glsl/raymarching.js

@ -111,6 +111,12 @@ void main() {
111 111
  border: none;
112 112
  background-color: rgba(255, 255, 255, 0.8);
113 113
}
114
115
#editor-changed {
116
  position: absolute;
117
  right: 0;
118
  top: 1.5em;
119
}
114 120
  `
115 121
  document.head.appendChild(styleEl);
116 122