A web-based drawing app
git clone git://soophie.de/outline
1
*{margin:0;padding:0;font-family:Roboto,sans-serif;box-sizing:border-box}:focus,:hover{outline:0}html{position:relative;overflow-x:hidden;min-height:100vh}body{width:100%;font-size:14px;min-height:100vh}img{pointer-events:none;user-select:none}input{-webkit-appearance:none}button{user-select:none;cursor:pointer}.hidden{display:none!important}.ico{font-family:'Material Icons';font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:'liga';user-select:none;pointer-events:none}*{-webkit-tap-highlight-color:transparent}body,html{overflow:hidden}#canvas,#overlay,.controls{position:fixed;top:0;left:0;right:0;bottom:0}#overlay{pointer-events:none}.prime-badge{display:inline-block;margin-top:-1px;margin-left:5px;padding:2px 4px;background:#0372EF;border-radius:2px;font-weight:500;font-size:12px;color:#fff!important}.beta-badge{display:inline-block;margin-top:-1px;margin-left:5px;padding:2px 4px;background:#388E3C;border-radius:2px;font-weight:500;font-size:12px;color:#fff!important}.controls{pointer-events:none}.controls .notification{top:30px;position:fixed;display:flex;justify-content:center;width:100%;opacity:0}.controls .notification p{display:inline-block;padding:10px 24px;border-radius:999px;background:#24292E;color:#fff;opacity:.95;user-select:none;pointer-events:none}.controls .ad{position:fixed;width:400px;height:150px;border-radius:4px;background:#EEE;bottom:40px;right:40px;pointer-events:all}.controls .hotbar{display:flex;position:fixed;left:calc(50% - 216px);bottom:30px;pointer-events:all;z-index:-1}.controls .hotbar .color{margin:6px;width:60px;height:60px;border-radius:30px;background:#EEE;cursor:pointer;transition:transform .2s;transform:scale(.9)}.controls .hotbar .color:not(.active):hover{transform:scale(1)}.controls .hotbar .color.focus{transform:scale(1)}.controls .hotbar .color.active{transform:scale(1.1)}.controls .toolbar{top:20px;left:20px}.controls .actionbar{top:20px;right:20px}.controls .actionbar,.controls .toolbar{display:flex;position:fixed;pointer-events:all}.controls .actionbar .action,.controls .actionbar .tool,.controls .toolbar .action,.controls .toolbar .tool{width:44px;height:44px;padding:10px;margin-left:8px;border-radius:22px;cursor:pointer}.controls .actionbar .action:hover,.controls .actionbar .tool:hover,.controls .toolbar .action:hover,.controls .toolbar .tool:hover{background:rgba(250,250,250,.95)}.controls .actionbar .action:hover.ripple:not(.active).ripple-active,.controls .actionbar .tool:hover.ripple:not(.active).ripple-active,.controls .toolbar .action:hover.ripple:not(.active).ripple-active,.controls .toolbar .tool:hover.ripple:not(.active).ripple-active{background:rgba(245,245,245,.95)}.controls .actionbar .action:hover.ripple.active.ripple-active,.controls .actionbar .tool:hover.ripple.active.ripple-active,.controls .toolbar .action:hover.ripple.active.ripple-active,.controls .toolbar .tool:hover.ripple.active.ripple-active{background:rgba(233,233,233,.95)}.controls .actionbar .action.active,.controls .actionbar .tool.active,.controls .toolbar .action.active,.controls .toolbar .tool.active{background:rgba(238,238,238,.95)}.controls .actionbar .action i.ico,.controls .actionbar .tool i.ico,.controls .toolbar .action i.ico,.controls .toolbar .tool i.ico{color:#424242}.multiplayer-modal{top:75px;right:120px}.account-modal{top:75px;right:70px}.settings-modal{top:75px;right:20px}.device-modal{top:100px;right:320px}.language-modal{top:100px;right:860px}.settings-modal{top:75px;right:20px}.colors-modal{flex-wrap:wrap;width:425px;max-width:425px;min-width:425px;height:860px;padding:30px!important;top:calc(50% - 430px);left:calc(50% - 212.5px)}.colors-modal .color{margin:6px;width:60px;height:60px;border-radius:30px;background:#EEE;cursor:pointer;transition:transform .2s;transform:scale(.9)}.colors-modal .color:not(.active):hover{transform:scale(1)}.colors-modal .color.active{transform:scale(1.1)}.colors-modal .color.focus{transform:scale(1)}.modal{width:250px;position:fixed;background:#fff;border:1px solid #F1F1F1;border-radius:4px;padding:6px 0;pointer-events:all;overflow:hidden;z-index:-1;display:flex}.modal .main{width:248px;min-width:248px;7max-width:248px}.modal ul.tab-list{width:248px;min-width:248px;max-width:248px}.modal .header{display:flex;margin-bottom:3px}.modal .header .back{margin:10px;margin-top:15px;margin-right:3px;width:36px;height:36px;border-radius:18px;padding:6px;padding-left:5px;cursor:pointer}.modal .header .back i.ico{color:#424242}.modal .header .back:hover{background:#FAFAFA}.modal .header .back.ripple.ripple-active{background:#f5f5f5}.modal .header .info{display:flex;flex-direction:column;margin-top:15px}.modal .header .info p{display:flex;align-items:center;font-weight:500;color:#616161;user-select:none;pointer-events:none}.modal .header .info span{display:block;margin-top:3px;font-size:12px;color:#9E9E9E;user-select:none;pointer-events:none}.modal ul.item-list li.caption{padding:2px 15px;padding-top:12px;list-style:none}.modal ul.item-list li.caption p{color:#9E9E9E;user-select:none;pointer-events:none}.modal ul.item-list li.item{display:flex;align-items:center;padding:15px;cursor:pointer}.modal ul.item-list li.item.empty p{display:block;width:100%;color:#9E9E9E;text-align:center;user-select:none;pointer-events:none}.modal ul.item-list li.item:not(.active):not(.inactive):hover{background:#FAFAFA}.modal ul.item-list li.item:not(.active):not(.inactive).ripple.ripple-active{background:#f5f5f5}.modal ul.item-list li.item i.ico{color:#424242;user-select:none;pointer-events:none}.modal ul.item-list li.item i.lang{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:600;width:24px;height:24px;color:#424242;user-select:none;pointer-events:none}.modal ul.item-list li.item .info{display:flex;flex-direction:column;margin-left:10px;max-width:calc(100% - 24px - 10px)}.modal ul.item-list li.item .info p{display:flex;align-items:center;font-weight:500;color:#616161;user-select:none;pointer-events:none}.modal ul.item-list li.item .info span{display:block;margin-top:3px;font-size:12px;color:#9E9E9E;user-select:none;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.modal ul.item-list li.item.active{background:#EEE}.modal ul.item-list li.item.active.ripple.ripple-active{background:#e9e9e9}.modal ul.item-list li.item.inactive i.ico{color:#9E9E9E}.modal ul.item-list li.item.inactive .info p{color:#9E9E9E}.tooltip{position:relative;display:flex;justify-content:center;align-items:center}.tooltip:hover::before{opacity:.95;transition-delay:.6s}.tooltip:hover::after{opacity:.95;transition-delay:.6s}.tooltip::after{display:flex;opacity:0;content:attr(data-title);justify-content:center;align-items:center;position:absolute;background:#24292E;color:#fff;min-height:24px;padding:0 12px;border-radius:999px;font-size:12px;top:auto;bottom:-70%;white-space:nowrap;z-index:9999;pointer-events:none}.tooltip.up::before{top:calc(-90% + 26px);bottom:auto;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #24292E;border-bottom:none}.tooltip.up::after{top:-60%;bottom:auto}.tooltip.down::before{top:auto;bottom:calc(-90% + 26px);border-left:6px solid transparent;border-right:6px solid transparent;border-top:none;border-bottom:6px solid #24292E}.tooltip.down::after{top:auto;bottom:-60%}1
\ No newline at end of file1
*{margin:0;padding:0;font-family:Roboto,sans-serif;box-sizing:border-box}:focus,:hover{outline:0}html{position:relative;overflow-x:hidden;min-height:100vh}body{width:100%;font-size:14px;min-height:100vh}img{pointer-events:none;user-select:none}input{-webkit-appearance:none}button{user-select:none;cursor:pointer}.hidden{display:none!important}.ico{font-family:'Material Icons';font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:'liga';user-select:none;pointer-events:none}*{-webkit-tap-highlight-color:transparent}body,html{overflow:hidden}#canvas,#overlay,.controls{position:fixed;top:0;left:0;right:0;bottom:0}#overlay{pointer-events:none}.prime-badge{display:inline-block;margin-top:-1px;margin-left:5px;padding:2px 4px;background:#0372EF;border-radius:2px;font-weight:500;font-size:12px;color:#fff!important}.beta-badge{display:inline-block;margin-top:-1px;margin-left:5px;padding:2px 4px;background:#388E3C;border-radius:2px;font-weight:500;font-size:12px;color:#fff!important}.controls{pointer-events:none}.controls .notification{top:30px;position:fixed;display:flex;justify-content:center;width:100%;opacity:0}.controls .notification p{display:inline-block;padding:10px 24px;border-radius:999px;background:#24292E;color:#fff;opacity:.95;user-select:none;pointer-events:none}.controls .ad{position:fixed;width:400px;height:150px;border-radius:4px;background:#EEE;bottom:40px;right:40px;pointer-events:all}.controls .hotbar{display:flex;position:fixed;left:calc(50% - 216px);bottom:30px;pointer-events:all;z-index:-1}.controls .hotbar .color{margin:6px;width:60px;height:60px;border-radius:30px;background:#EEE;cursor:pointer;transition:transform .2s;transform:scale(.9)}.controls .hotbar .color:not(.active):hover{transform:scale(1)}.controls .hotbar .color.focus{transform:scale(1)}.controls .hotbar .color.active{transform:scale(1.1)}.controls .scale-modal{top:40px;left:calc(50% - 200px);width:400px;height:60px}.controls .scale-modal input[type=range]{-webkit-appearance:none;width:calc(400px - 54px);margin-top:21px;margin-left:27px;height:6px;background:#EEE;border:none;border-radius:4px}.controls .scale-modal input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none}.controls .scale-modal input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;height:20px;width:20px;margin-top:0;background:#9E9E9E;border-radius:10px;cursor:pointer}.controls .scale-modal input[type=range]::-webkit-slider-thumb:hover{background:#757575}.controls .clear-modal{top:calc(50% - 100px);left:calc(50% - 200px);width:400px;height:200px;display:grid;padding:30px 10px 30px 10px}.controls .clear-modal .text-clear{font-size:20px;width:380px;height:px;text-align:center;align-items:center}.controls .clear-modal .align{display:flex;margin-top:auto}.controls .clear-modal .align .btn-cancel{width:185px;height:50px;border:none;border-radius:3px;background-color:#F5F5F5;font-size:17px}.controls .clear-modal .align .btn-cancel:hover{background-color:#E0E0E0}.controls .clear-modal .align .btn-apply{width:185px;height:50px;border:none;border-radius:3px;border-color:grey;background-color:#F5F5F5;margin-left:10px;font-size:17px}.controls .clear-modal .align .btn-apply:hover{background-color:#E0E0E0}.controls .toolbar{top:20px;left:20px}.controls .actionbar{top:20px;right:20px}.controls .actionbar,.controls .toolbar{display:flex;position:fixed;pointer-events:all}.controls .actionbar .action,.controls .actionbar .tool,.controls .toolbar .action,.controls .toolbar .tool{width:44px;height:44px;padding:10px;margin-left:8px;border-radius:22px;cursor:pointer}.controls .actionbar .action:hover,.controls .actionbar .tool:hover,.controls .toolbar .action:hover,.controls .toolbar .tool:hover{background:rgba(250,250,250,.95)}.controls .actionbar .action:hover.ripple:not(.active).ripple-active,.controls .actionbar .tool:hover.ripple:not(.active).ripple-active,.controls .toolbar .action:hover.ripple:not(.active).ripple-active,.controls .toolbar .tool:hover.ripple:not(.active).ripple-active{background:rgba(245,245,245,.95)}.controls .actionbar .action:hover.ripple.active.ripple-active,.controls .actionbar .tool:hover.ripple.active.ripple-active,.controls .toolbar .action:hover.ripple.active.ripple-active,.controls .toolbar .tool:hover.ripple.active.ripple-active{background:rgba(233,233,233,.95)}.controls .actionbar .action.active,.controls .actionbar .tool.active,.controls .toolbar .action.active,.controls .toolbar .tool.active{background:rgba(238,238,238,.95)}.controls .actionbar .action i.ico,.controls .actionbar .tool i.ico,.controls .toolbar .action i.ico,.controls .toolbar .tool i.ico{color:#424242}.multiplayer-modal{top:75px;right:120px}.account-modal{top:75px;right:70px}.settings-modal{top:75px;right:20px}.device-modal{top:100px;right:320px}.language-modal{top:100px;right:860px}.settings-modal{top:75px;right:20px}.colors-modal{flex-wrap:wrap;width:425px;max-width:425px;min-width:425px;height:860px;padding:30px!important;top:calc(50% - 430px);left:calc(50% - 212.5px)}.colors-modal .color{margin:6px;width:60px;height:60px;border-radius:30px;background:#EEE;cursor:pointer;transition:transform .2s;transform:scale(.9)}.colors-modal .color:not(.active):hover{transform:scale(1)}.colors-modal .color.active{transform:scale(1.1)}.colors-modal .color.focus{transform:scale(1)}.modal{width:250px;position:fixed;background:#fff;border:1px solid #F1F1F1;border-radius:4px;padding:6px 0;pointer-events:all;overflow:hidden;z-index:-1;display:flex}.modal .main{width:248px;min-width:248px;7max-width:248px}.modal ul.tab-list{width:248px;min-width:248px;max-width:248px}.modal .header{display:flex;margin-bottom:3px}.modal .header .back{margin:10px;margin-top:15px;margin-right:3px;width:36px;height:36px;border-radius:18px;padding:6px;padding-left:5px;cursor:pointer}.modal .header .back i.ico{color:#424242}.modal .header .back:hover{background:#FAFAFA}.modal .header .back.ripple.ripple-active{background:#f5f5f5}.modal .header .info{display:flex;flex-direction:column;margin-top:15px}.modal .header .info p{display:flex;align-items:center;font-weight:500;color:#616161;user-select:none;pointer-events:none}.modal .header .info span{display:block;margin-top:3px;font-size:12px;color:#9E9E9E;user-select:none;pointer-events:none}.modal ul.item-list .separator{margin:6px 0;width:100%;height:1px;background:#F1F1F1}.modal ul.item-list li.caption{padding:2px 15px;padding-top:12px;list-style:none}.modal ul.item-list li.caption p{color:#9E9E9E;user-select:none;pointer-events:none}.modal ul.item-list li.item{display:flex;align-items:center;padding:15px;cursor:pointer}.modal ul.item-list li.item.empty p{display:block;width:100%;color:#9E9E9E;text-align:center;user-select:none;pointer-events:none}.modal ul.item-list li.item:not(.active):not(.inactive):hover{background:#FAFAFA}.modal ul.item-list li.item:not(.active):not(.inactive).ripple.ripple-active{background:#f5f5f5}.modal ul.item-list li.item i.ico{color:#424242;user-select:none;pointer-events:none}.modal ul.item-list li.item i.lang{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:600;width:24px;height:24px;color:#424242;user-select:none;pointer-events:none}.modal ul.item-list li.item .info{display:flex;flex-direction:column;margin-left:10px;max-width:calc(100% - 24px - 10px)}.modal ul.item-list li.item .info p{display:flex;align-items:center;font-weight:500;color:#616161;user-select:none;pointer-events:none}.modal ul.item-list li.item .info span{display:block;margin-top:3px;font-size:12px;color:#9E9E9E;user-select:none;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.modal ul.item-list li.item.active{background:#EEE}.modal ul.item-list li.item.active.ripple.ripple-active{background:#e9e9e9}.modal ul.item-list li.item.inactive i.ico{color:#9E9E9E}.modal ul.item-list li.item.inactive .info p{color:#9E9E9E}.tooltip{position:relative;display:flex;justify-content:center;align-items:center}.tooltip:hover::before{opacity:.95;transition-delay:.6s}.tooltip:hover::after{opacity:.95;transition-delay:.6s}.tooltip::after{display:flex;opacity:0;content:attr(data-title);justify-content:center;align-items:center;position:absolute;background:#24292E;color:#fff;min-height:24px;padding:0 12px;border-radius:999px;font-size:12px;top:auto;bottom:-70%;white-space:nowrap;z-index:9999;pointer-events:none}.tooltip.up::before{top:calc(-90% + 26px);bottom:auto;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #24292E;border-bottom:none}.tooltip.up::after{top:-60%;bottom:auto}.tooltip.down::before{top:auto;bottom:calc(-90% + 26px);border-left:6px solid transparent;border-right:6px solid transparent;border-top:none;border-bottom:6px solid #24292E}.tooltip.down::after{top:auto;bottom:-60%}1
\ No newline at end of file
33
<div class="tool ripple tooltip" data-lang="tool.clear" data-type="tooltip" data-title="Clear" data-modal="clear" onclick="toggle_modal(this)">34
<i class="ico">delete</i>35
</div>36
<div class="tool ripple tooltip" data-lang="tool.screenshot" data-type="tooltip" data-title="Screenshot" data-modal="screenshot" onclick="toggle_modal(this)">36
<div class="tool ripple tooltip" data-lang="tool.capture" data-type="tooltip" data-title="Capture" data-modal="capture" onclick="toggle_modal(this)">37
<i class="ico">crop_free</i>38
</div>39
</div>
114
<div class="color"></div>115
</div>116
<div class="modal scale-modal hidden">117
<input type="range" min="1" max="50" value="3" step="1" class="action-range">118
<div class="preview-circle"></div>117
<input type="range" min="2" max="50" value="14" step="1">118
</div>119
<div class="modal clear-modal hidden">120
<p class="text-clear">Do you want to clear the screen?</p>121
<div class="align">122
<button class="btn btn-cancel" data-modal="clear" onclick="toggle_modal(this)">No</button>123
<button class="btn btn-apply" onclick="clear_screen()">Yes</button>124
</div>125
</div>122
<div class="modal screenshot-modal hidden">126
<div class="modal capture-modal hidden">127
</div>128
<div class="modal multiplayer-modal hidden">129
<div class="main">
142
<span data-lang="multiplayer.create.info">Create a new channel</span>143
</div>144
</li>141
<li class="item ripple">145
<li class="item ripple inactive">146
<i class="ico">device_hub</i>147
<div class="info">148
<p data-lang="multiplayer.host" data-prime="true">Host<b class="prime-badge">Prime</b></p>149
<span data-lang="multiplayer.host.info">Host current state as channel</span>150
</div>151
</li>148
<!--149
<li class="item ripple">150
<i class="ico">info</i>152
<li class="separator"></li>153
<li class="item ripple" data-tab="customize" onclick="open_tab(this)">154
<i class="ico">build</i>155
<div class="info">152
<p data-lang="channel.information">Info</p>153
<span data-lang="channel.information.info">Customize channel info</span>156
<p data-lang="multiplayer.customize">Customize</p>157
<span data-lang="multiplayer.host.info">Manage own channel</span>158
</div>159
</li>160
<li class="item ripple">161
<i class="ico">person_add</i>162
<div class="info">159
<p data-lang="channel.invite-friends">Invite friends</p>160
<span data-lang="channel.invite-friends.info">Share channel with others</span>163
<p data-lang="multiplayer.invite-friends">Invite friends</p>164
<span data-lang="multiplayer.invite-friends.info">Share channel with others</span>165
</div>166
</li>167
<li class="item ripple">164
<i class="ico">lock</i>168
<i class="ico">close</i>169
<div class="info">166
<p data-lang="channel.private">Private</p>167
<span data-lang="channel.private.info">Prevent channel being listed</span>170
<p data-lang="multiplayer.leave">Leave</p>171
<span data-lang="multiplayer.leave.info">Leave current channel</span>172
</div>173
</li>170
<li class="item ripple">171
<i class="ico">watch_later</i>172
<div class="info">173
<p data-lang="channel.permanent" data-prime="true">Permanent<b class="prime-badge">Prime</b></p>174
<span data-lang="channel.permanent.info">Keep channel permanent online</span>174
</ul>175
</div>176
<ul class="tab-list">177
<li class="tab customize-tab">178
<div class="header">179
<div class="back ripple" onclick="close_tab(this)">180
<i class="ico">keyboard_arrow_left</i>181
</div>176
</li>177
<li class="item ripple">178
<i class="ico">verified_user</i>182
<div class="info">180
<p data-lang="channel.roles" data-prime="true">Roles<b class="prime-badge">Prime</b></p>181
<span data-lang="channel.roles.info">Manage user permissions</span>183
<p data-lang="multiplayer.customize">Customize</p>184
<span data-lang="multiplayer.host.info">Manage own channel</span>185
</div>183
</li>184
-->185
</ul>186
</div>187
<ul class="tab-list"></ul>186
</div>187
<ul class="item-list">188
<li class="item ripple">189
<i class="ico">info</i>190
<div class="info">191
<p data-lang="channel.information">Info</p>192
<span data-lang="channel.information.info">Customize channel info</span>193
</div>194
</li>195
<li class="item ripple">196
<i class="ico">lock</i>197
<div class="info">198
<p data-lang="channel.private">Private</p>199
<span data-lang="channel.private.info">Prevent channel being listed</span>200
</div>201
</li>202
<li class="item ripple inactive">203
<i class="ico">watch_later</i>204
<div class="info">205
<p data-lang="channel.permanent" data-prime="true">Permanent<b class="prime-badge">Prime</b></p>206
<span data-lang="channel.permanent.info">Keep channel permanent online</span>207
</div>208
</li>209
<li class="item ripple inactive">210
<i class="ico">verified_user</i>211
<div class="info">212
<p data-lang="channel.roles" data-prime="true">Roles<b class="prime-badge">Prime</b></p>213
<span data-lang="channel.roles.info">Manage user permissions</span>214
</div>215
</li>216
</ul>217
</li>218
</ul>219
</div>220
<div class="modal account-modal hidden">221
<div class="main">222
<ul class="item-list">223
<li class="item ripple">193
<i class="ico">account_circle</i>224
<i class="ico">publish</i>225
<div class="info">195
<p data-lang="account.profile">Profile</p>196
<span data-lang="account.profile.info">View your profile</span>226
<p data-lang="account.upgrade" data-prime="true">Upgrade<b class="prime-badge">Get Prime</b></p>227
<span data-lang="account.upgrade.info">Unlock all fancy features</span>228
</div>229
</li>230
<li class="separator"></li>231
<li class="item ripple">232
<i class="ico">card_giftcard</i>233
<div class="info">202
<p data-lang="account.support" data-beta="true">Support<b class="beta-badge">Beta</b></p>234
<p data-lang="account.support">Support</p>235
<span data-lang="account.support.info">Donate a cup of coffee</span>236
</div>237
</li>238
<li class="item ripple">239
<i class="ico">question_answer</i>240
<div class="info">241
<p data-lang="account.feedback">Feedback</p>242
<span data-lang="account.feedback.info">Improve our service</span>243
</div>244
</li>245
<li class="separator"></li>246
<li class="item ripple">247
<i class="ico">account_circle</i>248
<div class="info">249
<p data-lang="account.profile">Profile</p>250
<span data-lang="account.profile.info">View your profile</span>251
</div>252
</li>253
<li class="item ripple">254
<i class="ico">exit_to_app</i>255
<div class="info">256
<p data-lang="account.logout">Log out</p>
264
<div class="modal settings-modal hidden">265
<div class="main">266
<ul class="item-list">267
<li class="item ripple" data-tab="help" onclick="open_tab(this)">268
<i class="ico">help</i>269
<div class="info">270
<p data-lang="setting.help">Help</p>271
<span data-lang="setting.help.info">Learn more about the features</span>272
</div>273
</li>274
<li class="item ripple" data-tab="language" onclick="open_tab(this)">275
<i class="ico">language</i>276
<div class="info">223
<p data-lang="setting.language">Language</p>277
<p data-lang="setting.language" data-beta="true">Language<b class="beta-badge">Beta</b></p>278
<span data-lang="setting.language.info">Choose preferred language</span>279
</div>280
</li>
288
<li class="item ripple" data-tab="appearance" onclick="open_tab(this)">289
<i class="ico">brush</i>290
<div class="info">237
<p data-lang="setting.appearance" data-prime="true">Appearance<b class="prime-badge">Prime</b></p>291
<p data-lang="setting.appearance">Appearance</p>292
<span data-lang="setting.appearance.info">Customize how you want</span>293
</div>294
</li>295
</ul>296
</div>297
<ul class="tab-list">298
<li class="tab help-tab hidden">299
<div class="header">300
<div class="back ripple" onclick="close_tab(this)">301
<i class="ico">keyboard_arrow_left</i>302
</div>303
<div class="info">304
<p data-lang="setting.help">Help</p>305
<span data-lang="setting.help.info">Learn more about the features</span>306
</div>307
</div>308
<ul class="item-list">309
<li class="item ripple">310
<i class="ico">bookmark_border</i>311
<div class="info">312
<p>Controls</p>313
<span>Keyboard, Touch, Controller</span>314
</div>315
</li>316
<li class="item ripple">317
<i class="ico">bookmark_border</i>318
<div class="info">319
<p>Multiplayer</p>320
<span>Channel, Roles</span>321
</div>322
</li>323
</ul>324
</li>325
<li class="tab language-tab hidden">326
<div class="header">327
<div class="back ripple" onclick="close_tab(this)">328
<i class="ico">keyboard_arrow_left</i>329
</div>330
<div class="info">250
<p data-lang="setting.language">Language</p>331
<p data-lang="setting.language" data-beta="true">Language<b class="beta-badge">Beta</b></p>332
<span data-lang="setting.language.info">Choose preferred language</span>333
</div>334
</div>
362
<li class="item empty inactive">363
<p data-lang="setting.input-device.empty">No devices detected</p>364
</li>284
<li class="item ripple hidden" data-device="mouse" onclick="change_device(this)">365
<li class="item ripple inactive" data-device="mouse" onclick="change_device(this)">366
<i class="ico">mouse</i>367
<div class="info">368
<p data-lang="setting.input-device.mouse">Mouse</p>369
<span data-lang="setting.input-device.default">Default input device</span>370
</div>371
</li>291
<li class="item ripple hidden" data-device="touch" onclick="change_device(this)">372
<li class="item ripple inactive" data-device="touch" onclick="change_device(this)">373
<i class="ico">gesture</i>374
<div class="info">375
<p data-lang="setting.input-device.touch">Touch</p>376
<span data-lang="setting.input-device.touch.info">Finger interaction</span>377
</div>378
</li>298
<li class="item hidden" data-device="pen" onclick="change_device(this)">379
<li class="item ripple inactive" data-device="pen" onclick="change_device(this)">380
<i class="ico">edit</i>381
<div class="info">382
<p data-lang="setting.input-device.pencil" data-prime="true">Pencil<b class="prime-badge">Prime</b></p>383
<span data-lang="setting.input-device.pencil.info">Stylus pen, touch disabled</span>384
</div>385
</li>305
<li class="item hidden" data-device="gamepad" onclick="change_device(this)">386
<li class="item ripple inactive" data-device="gamepad" onclick="change_device(this)">387
<i class="ico">sports_esports</i>388
<div class="info">389
<p data-lang="setting.input-device.gamepad" data-prime="true">Gamepad<b class="prime-badge">Prime</b></p>
398
<i class="ico">keyboard_arrow_left</i>399
</div>400
<div class="info">320
<p data-lang="setting.appearance" data-prime="true">Appearance<b class="prime-badge">Prime</b></p>401
<p data-lang="setting.appearance">Appearance</p>402
<span data-lang="setting.appearance.info">Customize how you want</span>403
</div>404
</div>
406
<li class="item ripple inactive">407
<i class="ico">toggle_off</i>408
<div class="info">328
<p>Dark Mode</p>409
<p data-prime="true">Dark Mode<b class="prime-badge">Prime</b></p>410
<span data-lang="">More pleasant for your eyes</span>411
</div>412
</li>413
<li class="item ripple inactive">414
<i class="ico">toggle_off</i>415
<div class="info">335
<p>Fading UI</p>416
<p data-prime="true">Fading UI<b class="prime-badge">Prime</b></p>417
<span data-lang="">UI fades out while drawing</span>418
</div>419
</li>
3
'tool.colors': 'Colors',4
'tool.scale': 'Scale',5
'tool.clear': 'Clear',6
'tool.screenshot': 'Screenshot',6
'tool.capture': 'Capture',7
'action.multiplayer': 'Multiplayer',8
'action.account': 'Account',9
'action.settings': 'Settings',
12
'notification.input-device.pencil.add': 'Pencil detected',13
'notification.input-device.gamepad.add': 'Gamepad detected',14
'notification.input-device.gamepad.remove': 'Gamepad removed',15
'notification.clear': 'Screen cleared',16
'multiplayer.join': 'Join',17
'multiplayer.join.info': 'Search for channel to join',18
'multiplayer.create': 'Create',19
'multiplayer.create.info': 'Create a new channel',20
'multiplayer.host': 'Host',21
'multiplayer.host.info': 'Host current state as channel',22
'multiplayer.invite-friends': 'Invite friends',23
'multiplayer.invite-friends.info': 'Share channel with others',24
'channel.information': 'Info',25
'channel.information.info': 'Customize channel info',23
'channel.invite-friends': 'Invite friends',24
'channel.invite-friends.info': 'Share channel with others',26
'channel.private': 'Private',27
'channel.private.info': 'Prevent channel being listed',28
'channel.permanent': 'Permanent',29
'channel.permanent.info': 'Keep channel permanent online',30
'channel.roles': 'Roles',31
'channel.roles.info': 'Manage user permissions',32
'account.upgrade': 'Upgrade',33
'account.upgrade.info': 'Unlock all fancy features',34
'account.profile': 'Profile',35
'account.profile.info': 'View your profile',36
'account.support': 'Support',37
'account.support.info': 'Donate a cup of coffee',38
'account.feedback': 'Feedback',39
'account.feedback.info': 'Improve our service',40
'account.logout': 'Log out',41
'account.logout.info': 'Sign out from account',42
'setting.help': 'Help',43
'setting.help.info': 'Learn more about the features',44
'setting.language': 'Language',45
'setting.language.info': 'Choose preferred language',46
'setting.language.default': 'Default language',
64
'tool.colors': 'Farben',65
'tool.scale': 'Skalierung',66
'tool.clear': 'Löschen',60
'tool.screenshot': 'Screenshot',67
'tool.capture': 'Capture',68
'action.multiplayer': 'Mehrspieler',69
'action.account': 'Konto',70
'action.settings': 'Einstellungen',
73
'notification.input-device.pencil.add': 'Stift erkannt',74
'notification.input-device.gamepad.add': 'Gamepad erkannt',75
'notification.input-device.gamepad.remove': 'Gamepad entfernt',76
'notification.clear': 'Bildschirm gelöscht',77
'multiplayer.join': 'Beitreten',78
'multiplayer.join.info': 'Suche nach beitretbaren Channels',79
'multiplayer.create': 'Erstellen',80
'multiplayer.create.info': 'Erstelle einen Channel',81
'multiplayer.host': 'Hosten',82
'multiplayer.invite-friends': 'Freunde einladen',83
'multiplayer.invite-friends.info': 'Teile Channel mit anderen',84
'multiplayer.host.info': 'Hoste aktuellen Stand als Channel',85
'channel.information': 'Info',86
'channel.information.info': 'Personalisiere Channel Info',77
'channel.invite-friends': 'Freunde einladen',78
'channel.invite-friends.info': 'Teile Channel mit anderen',87
'channel.private': 'Privat',88
'channel.private.info': 'Verhindere Channel Listung',89
'channel.permanent': 'Permanent',90
'channel.permanent.info': 'Behalte Channel dauerhaft online',91
'channel.roles': 'Rollen',92
'channel.roles.info': 'Verwalte Nutzerberechtigungen',93
'account.upgrade': 'Upgrade',94
'account.upgrade.info': 'Schalte alle Features frei',95
'account.profile': 'Profil',96
'account.profile.info': 'Zu Profil gehen',97
'account.support': 'Unterstützen',98
'account.support.info': 'Spende eine Tasse Kaffee',99
'account.feedback': 'Feedback',100
'account.feedback.info': 'Verbessere unseren Service',101
'account.logout': 'Abmelden',102
'account.logout.info': 'Von Konto abmelden',103
'setting.help': 'Hilfe',104
'setting.help.info': 'Erfahre mehr über die Funktionen',105
'setting.language': 'Sprache',106
'setting.language.info': 'Wähle bevorzugte Sprache',107
'setting.language.default': 'Standard Sprache',
123
}124
};112
const PRIME_CODE = '<b class="prime-badge">Prime</b>';113
const BETA_CODE = '<b class="beta-badge">Beta</b>';126
const KEY_BINDING = {127
0: 'A',128
1: 'B',
233
let current_tab;234
let modal_colors;235
let colors_modal;236
let capture_modal;237
let clear_modal;238
let scale_range;240
let device;241
let devices = {
252
let cache;253
let point;254
let last;255
let start;256
let index = 0;257
let radius = 14;258
let lock_x = false;
262
let pressed = {};263
let arrow_y = 0;264
let arrow_x = 0;265
let left_modal = false;267
window.addEventListener('load', init);
287
}288
let ripple = document.querySelectorAll('.ripple');289
for(let item of ripple) {274
item.addEventListener('mousedown', function(event) {290
item.addEventListener('pointerdown', function(event) {291
item.classList.add('ripple-active');292
});293
}294
document.addEventListener('touchmove', function(event) {279
event.preventDefault();295
let { target } = event;296
if(target !== scale_range) {297
event.preventDefault();298
}299
}, { passive: false });281
document.addEventListener('mouseup', function(event) {300
document.addEventListener('pointerup', function(event) {301
for(let item of ripple) {302
item.classList.remove('ripple-active');303
}304
});305
device_options = document.querySelectorAll('.settings-modal .device-tab .item[data-device]');306
device_empty = document.querySelector('.settings-modal .device-tab .item.empty');
315
modals = document.querySelectorAll('.modal');316
modal_colors = document.querySelectorAll('.colors-modal .color');317
colors_modal = document.querySelector('.toolbar .tool[data-modal="colors"]');318
capture_modal = document.querySelector('.toolbar .tool[data-modal="capture"]');319
clear_modal = document.querySelector('.toolbar .tool[data-modal="clear"]');320
scale_range = document.querySelector('.scale-modal input[type="range"]');321
for(let i in colors) {322
if(COLOR_LENGTH > i) {323
if(i == index) {324
colors[i].classList.add('active');325
}326
colors[i].style.background = COLOR[i];306
colors[i].addEventListener('click', function(event) {327
colors[i].addEventListener('pointerdown', function(event) {328
for(let j in colors) {329
if(COLOR_LENGTH > j) {330
if(j == i) {
339
for(let i in modal_colors) {340
if(COLORS_LENGTH > i) {341
modal_colors[i].style.background = COLORS[i];321
/*322
modal_colors[i].addEventListener('click', function(event) {323
for(let j in colors) {324
if(COLORS_LENGTH > j) {325
if(j == i) {326
index = j;327
}328
colors[j].classList[j == i ? 'add' : 'remove']('active');329
}330
}331
});332
*/342
}343
}344
document.addEventListener('dragstart', function(event) {
347
document.addEventListener('contextmenu', function(event) {348
event.preventDefault();349
});350
scale_range.addEventListener('input', function(event) {351
radius = parseInt(scale_range.value);352
left_modal = false;353
point.x = parseInt(window.innerWidth / 2);354
point.y = parseInt(window.innerHeight / 2);355
});356
document.addEventListener('wheel', function(event) {357
if(device !== 'gamepad') {358
let { deltaY } = event;359
let y = deltaY < 0 ? 1 : -1;360
if(radius + y > 2 - 1 && radius + y < 50 + 1) {361
radius += y;362
scale_range.value = radius;363
}364
}365
});
373
}374
}, { passive: false });375
canvas.addEventListener('pointerdown', function(event) {360
let { layerX, layerY, buttons, pointerType } = event;376
let { layerX, layerY, buttons, pointerType, target } = event;377
if(!devices.touch && pointerType === 'touch') {378
devices.touch = true;379
if(device) {
385
show_notification('notification.input-device.pencil.add');386
}387
if(device !== 'gamepad') {388
if(!lock_x) {389
start.x = layerX;390
}391
if(!lock_y) {392
start.y = layerY;393
}394
if(current_modal && target === canvas) {395
toggle_modal(current_modal);396
left_modal = true;397
}398
else {399
left_modal = false;400
}401
if(device === pointerType) {373
if(!lock_x) {374
point.x = layerX;375
last.x = layerX;376
}377
if(!lock_y) {378
point.y = layerY;379
last.y = layerY;402
if(!current_modal && !left_modal) {403
if(start.x !== null && start.y !== null) {404
if(buttons == 1) {405
draw_line(start, null, radius, COLOR[index]);406
}407
if(buttons == 2) {408
draw_line(start, null, radius, 'white');409
erase = true;410
last.x = null;411
last.y = null;412
}413
}414
}381
draw = buttons == 1;382
erase = buttons == 2;415
ad.style.pointerEvents = 'none';416
hotbar.style.pointerEvents = 'none';417
toolbar.style.pointerEvents = 'none';
423
}424
});425
document.addEventListener('pointermove', function(event) {394
let { layerX, layerY, target, pointerType } = event;426
let { layerX, layerY, target, pointerType, buttons } = event;427
if(!devices.mouse && pointerType === 'mouse') {428
devices.mouse = true;429
}430
if(device !== 'gamepad') {431
draw = buttons == 1;432
erase = buttons == 2;433
if(buttons == 3) {434
draw = true;435
erase = true;436
}437
if(start.x !== null || start.y !== null) {438
last = start;439
start = {440
x: null,441
y: null442
};443
}444
if(device === pointerType) {445
left_modal = false;446
if(target == canvas) {447
if(!lock_x) {448
point.x = layerX;
451
point.y = layerY;452
}453
}454
if(draw && erase) {455
last.x = null;456
last.y = null;457
}458
}459
if(!document.hasFocus()) {460
draw = false;
525
});526
point = { x: null, y: null };527
last = { x: null, y: null };528
start = { x: null, y: null };529
update();530
}
576
if(!devices.gamepad) {577
devices.gamepad = true;578
show_notification('notification.input-device.gamepad.add');579
if(gamepad.vibrationActuator) {580
gamepad.vibrationActuator.playEffect("dual-rumble", {581
startDelay: 0,582
duration: 100,583
weakMagnitude: 1.0,584
strongMagnitude: 1.0585
});586
}587
}588
if(device === 'gamepad') {589
if(point.x == null && point.y == null) {
623
key_pressed('Option', input, function() {624
toggle_modal(colors_modal);625
});626
// capture627
key_pressed('Capture', input, function() {628
toggle_modal(capture_modal);629
});630
// draw631
key_pressed('A', input, function() {632
last.x = null;633
last.y = null;634
if(!current_modal) {635
left_modal = false;636
}637
});638
// erase639
key_pressed('B', input, function() {
641
last.y = null;642
if(current_tab) {643
close_tab(current_tab);644
left_modal = true;645
}646
else if(current_modal) {647
toggle_modal(current_modal);648
left_modal = true;649
}650
else {651
left_modal = false;652
}653
});654
// sprint
657
key_pressed('R2', input);658
// clear659
key_pressed('Y', input, function() {589
if(!current_modal) {590
g.clearRect(0, 0, window.innerWidth, window.innerHeight);591
}660
toggle_modal(clear_modal);661
});662
// radius663
let y = -(input.axes['Right'].y / 2);664
if(y !== 0 && radius + y > 2 && radius + y < 50 + 1) {665
radius += y;666
scale_range.value = radius;667
}668
// lock y669
key_pressed('L3', input, function() {
733
}734
// device mouse option735
let mouse_option = document.querySelector('.settings-modal .device-tab .item[data-device="mouse"]');666
if(devices.mouse && mouse_option.classList.contains('hidden')) {667
mouse_option.classList.remove('hidden');736
if(devices.mouse && mouse_option.classList.contains('inactive')) {737
mouse_option.classList.remove('inactive');738
if(!device) {739
device = 'mouse';740
fallback_device = 'mouse';
743
}744
// device touch option745
let touch_option = document.querySelector('.settings-modal .device-tab .item[data-device="touch"]');676
if(devices.touch && touch_option.classList.contains('hidden')) {677
touch_option.classList.remove('hidden');746
if(devices.touch && touch_option.classList.contains('inactive')) {747
touch_option.classList.remove('inactive');748
if(!device) {749
device = 'touch';750
fallback_device = 'touch';
753
}754
// device pen option755
let pen_option = document.querySelector('.settings-modal .device-tab .item[data-device="pen"]');686
if(devices.pen && pen_option.classList.contains('hidden')) {687
pen_option.classList.remove('hidden');756
if(devices.pen && pen_option.classList.contains('inactive')) {757
pen_option.classList.remove('inactive');758
if(!device) {759
device = 'pen';760
fallback_device = 'pen';
763
}764
// device gamepad option765
let gamepad_option = document.querySelector('.settings-modal .device-tab .item[data-device="gamepad"]');696
if(devices.gamepad && gamepad_option.classList.contains('hidden')) {697
gamepad_option.classList.remove('hidden');766
if(devices.gamepad && gamepad_option.classList.contains('inactive')) {767
gamepad_option.classList.remove('inactive');768
if(!device) {769
device = 'gamepad';770
fallback_device = 'gamepad';771
gamepad_option.classList.add('active');772
}773
}704
if(!devices.gamepad && !gamepad_option.classList.contains('hidden')) {705
gamepad_option.classList.add('hidden');774
if(!devices.gamepad && !gamepad_option.classList.contains('inactive')) {775
gamepad_option.classList.add('inactive');776
gamepad_option.classList.remove('active');707
if(device !== fallback_device) {708
device = fallback_device;709
let option = document.querySelector(`.device-modal .item[data-device="${device}"]`);710
option.classList.add('active');711
}712
else {713
device = null;777
if(device === 'gamepad') {778
if(device !== fallback_device) {779
device = fallback_device;780
let option = document.querySelector(`.settings-modal .device-tab .item[data-device="${device}"]`);781
option.classList.add('active');782
}783
else {784
device = null;785
}786
point.x = null;787
point.y = null;788
last.x = null;789
last.y = null;790
}791
}792
// cursor visible793
canvas.style.cursor = device === 'mouse' ? 'none' : 'default';718
if(!current_modal) {794
if(!current_modal && !left_modal) {795
// pencil796
if(draw && !erase) {797
if(point.x !== null && point.y !== null) {798
if(last.x !== null && last.y !== null) {723
for(let p of lerp(point, last, radius)) {724
g.fillStyle = COLOR[index];725
g.beginPath();726
g.arc(p.x, p.y, parseInt(radius), 2 * Math.PI, 0);727
g.fill();728
}799
draw_line(point, last, radius, COLOR[index]);800
}801
}802
}
804
if(erase && !draw) {805
if(point.x !== null && point.y !== null) {806
if(last.x !== null && last.y !== null) {736
for(let p of lerp(point, last, radius)) {737
g.fillStyle = 'white';738
g.beginPath();739
g.arc(p.x, p.y, parseInt(radius), 2 * Math.PI, 0);740
g.fill();741
}807
draw_line(point, last, radius, 'white');808
}809
}810
}
840
}841
o.clearRect(0, 0, window.innerWidth, window.innerHeight);842
if(point.x !== null && point.y !== null) {777
o.fillStyle = 'white';778
o.beginPath();779
o.arc(point.x, point.y, parseInt(radius) + 2, 2 * Math.PI, 0);780
o.fill();781
o.fillStyle = COLOR[index];782
o.beginPath();783
o.arc(point.x, point.y, parseInt(radius), 2 * Math.PI, 0);784
o.fill();843
let touch_device = (device === 'touch' || device === 'pen');844
if(touch_device) {845
if(!left_modal) {846
o.fillStyle = 'white';847
o.beginPath();848
o.arc(point.x, point.y, parseInt(radius) + 2, 2 * Math.PI, 0);849
o.fill();850
o.fillStyle = COLOR[index];851
o.beginPath();852
o.arc(point.x, point.y, parseInt(radius), 2 * Math.PI, 0);853
o.fill();854
}855
}856
else {857
o.fillStyle = 'white';858
o.beginPath();859
o.arc(point.x, point.y, parseInt(radius) + 2, 2 * Math.PI, 0);860
o.fill();861
o.fillStyle = COLOR[index];862
o.beginPath();863
o.arc(point.x, point.y, parseInt(radius), 2 * Math.PI, 0);864
o.fill();865
}866
}786
if(erase && !draw) {787
o.beginPath();788
o.lineWidth = 2;789
o.strokeStyle = 'white';790
o.moveTo(point.x, point.y - parseInt(radius) * 0.5);791
o.lineTo(point.x, point.y + parseInt(radius) * 0.5);792
o.moveTo(point.x - parseInt(radius) * 0.5, point.y);793
o.lineTo(point.x + parseInt(radius) * 0.5, point.y);794
o.stroke();867
if(!left_modal) {868
if(erase && !draw) {869
o.beginPath();870
o.lineWidth = 2;871
o.strokeStyle = 'white';872
o.moveTo(point.x, point.y - parseInt(radius) * 0.5);873
o.lineTo(point.x, point.y + parseInt(radius) * 0.5);874
o.moveTo(point.x - parseInt(radius) * 0.5, point.y);875
o.lineTo(point.x + parseInt(radius) * 0.5, point.y);876
o.stroke();877
}878
}879
if(lock_x || lock_y) {880
o.beginPath();
892
}893
}812
function lerp(point, last, radius) {813
let result = [];814
let delta = {815
x: last.x - point.x,816
y: last.y - point.y817
};818
let distance = Math.sqrt(Math.pow(delta.x, 2) + Math.pow(delta.y, 2));819
let length = parseInt(distance / (radius / 20));820
for(let i = 0; i < length; i++) {821
let x = point.x + (delta.x / length * i);822
let y = point.y + (delta.y / length * i);823
result.push({ x: x, y: y });895
function draw_line(point, last, radius, color) {896
if(last) {897
g.lineCap = 'round';898
g.strokeStyle = color;899
g.lineWidth = 2 * parseInt(radius);900
g.beginPath();901
g.moveTo(last.x + 0.5, last.y + 0.5);902
g.lineTo(point.x + 0.5, point.y + 0.5);903
g.stroke();904
}825
if(length == 0) {826
result.push({ x: point.x, y: point.y });905
else {906
g.fillStyle = color;907
g.beginPath();908
g.arc(point.x, point.y, parseInt(radius), 2 * Math.PI, 0);909
g.fill();910
}828
return result;911
}913
function change_device(element) {832
device = element.dataset.device;833
for(let item of device_options) {834
item.classList[element === item ? 'add' : 'remove']('active');835
}836
if(device !== 'gamepad') {837
point.x = null;838
point.y = null;839
last.x = null;840
last.y = null;914
let value = element.dataset.device;915
if(devices[value]) {916
device = value;917
for(let item of device_options) {918
item.classList[element === item ? 'add' : 'remove']('active');919
}920
if(device !== 'gamepad') {921
point.x = null;922
point.y = null;923
last.x = null;924
last.y = null;925
}926
}927
}
935
let beta = item.dataset.beta === 'true';936
let type = item.dataset.type;937
let text = LANG[code][item.dataset.lang];938
let prime_content;939
let beta_content;940
if(prime) {941
prime_content = item.querySelector('b.prime-badge').textContent;942
}943
if(beta) {944
beta_content = item.querySelector('b.beta-badge').textContent;945
}946
if(text) {947
if(type === 'tooltip') {948
item.dataset.title = text;
951
item.textContent = text;952
}953
if(prime && type !== 'tooltip') {861
item.innerHTML += PRIME_CODE;954
item.innerHTML += `<b class="prime-badge">${prime_content}</b>`;955
}956
if(beta && type !== 'tooltip') {864
item.innerHTML += BETA_CODE;957
item.innerHTML += `<b class="beta-badge">${beta_content}</b>`;958
}959
}960
}
1024
function open_tab(element) {1025
let code = element.dataset.tab;933
let main = element.parentNode.parentNode;934
main.style.marginLeft = '-100%';1026
let main = element.parentNode.parentNode1027
let tab = document.querySelector(`.${code}-tab`);936
current_tab = tab.querySelector('.back');937
tab.classList.remove('hidden');938
main.classList.add('hidden');1028
if(tab) {1029
main.style.marginLeft = '-100%';1030
current_tab = tab.querySelector('.back');1031
tab.classList.remove('hidden');1032
main.classList.add('hidden');1033
}1034
}1036
function close_tab(element) {
1078
return v.toString(16);1079
});1080
}1082
function clear_screen() {1083
g.clearRect(0, 0, canvas.width, canvas.height);1084
show_notification('notification.clear');1085
toggle_modal(clear_modal);1086
}
111
}112
}114
.scale-modal {115
top: 40px;116
left: calc(50% - 200px);117
width: 400px;118
height: 60px;120
input[type="range"] {121
-webkit-appearance: none;122
width: calc(400px - 54px);123
margin-top: 21px;124
margin-left: 27px;125
height: 6px;126
background: #EEEEEE;127
border: none;128
border-radius: 4px;130
&::-webkit-slider-runnable-track {131
-webkit-appearance: none;132
}134
&::-webkit-slider-thumb {135
-webkit-appearance: none;136
height: 20px;137
width: 20px;138
margin-top: -0px;139
background: #9E9E9E;140
border-radius: 10px;141
cursor: pointer;143
&:hover {144
background: #757575;145
}146
}147
}148
}150
.clear-modal {151
top: calc(50% - 100px);152
left: calc(50% - 200px);153
width: 400px;154
height: 200px;155
display: grid;156
padding: 30px 10px 30px 10px;158
.text-clear {159
font-size: 20px;160
width: 380px;161
height: px;162
text-align: center;163
align-items: center;164
}166
.align {167
display: flex;168
margin-top: auto;170
.btn-cancel {171
width: 185px;172
height: 50px;173
border: none;174
border-radius: 3px;175
background-color: #F5F5F5;176
font-size: 17px;178
&:hover {179
background-color: #E0E0E0;180
}181
}183
.btn-apply {184
width: 185px;185
height: 50px;186
border: none;187
border-radius: 3px;188
border-color: grey;189
background-color: #F5F5F5;190
margin-left: 10px;191
font-size: 17px;193
&:hover {194
background-color: #E0E0E0;195
}196
}197
}198
}200
.toolbar {201
top: 20px;202
left: 20px;
396
ul.item-list {398
.separator {399
margin: 6px 0;400
width: 100%;401
height: 1px;402
background: #F1F1F1;403
}405
li.caption {406
padding: 2px 15px;407
padding-top: 12px;