mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-30 23:05:30 -04:00
Upgrade CodeMirror to 5.10.1 and now support fullscreen, jump-to-line in editor
This commit is contained in:
parent
ce65e58096
commit
eaa8ccaccb
381 changed files with 6726 additions and 2636 deletions
20
public/vendor/codemirror/mode/swift/index.html
vendored
Executable file → Normal file
20
public/vendor/codemirror/mode/swift/index.html
vendored
Executable file → Normal file
|
@ -35,11 +35,11 @@
|
|||
// Created by Main Account on 12/18/14.
|
||||
// Copyright (c) 2014 Razeware LLC. All rights reserved.
|
||||
//
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
class TipCalculatorModel {
|
||||
|
||||
|
||||
var total: Double
|
||||
var taxPct: Double
|
||||
var subtotal: Double {
|
||||
|
@ -47,30 +47,30 @@ class TipCalculatorModel {
|
|||
return total / (taxPct + 1)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
init(total: Double, taxPct: Double) {
|
||||
self.total = total
|
||||
self.taxPct = taxPct
|
||||
}
|
||||
|
||||
|
||||
func calcTipWithTipPct(tipPct: Double) -> Double {
|
||||
return subtotal * tipPct
|
||||
}
|
||||
|
||||
|
||||
func returnPossibleTips() -> [Int: Double] {
|
||||
|
||||
|
||||
let possibleTipsInferred = [0.15, 0.18, 0.20]
|
||||
let possibleTipsExplicit:[Double] = [0.15, 0.18, 0.20]
|
||||
|
||||
|
||||
var retval = [Int: Double]()
|
||||
for possibleTip in possibleTipsInferred {
|
||||
let intPct = Int(possibleTip*100)
|
||||
retval[intPct] = calcTipWithTipPct(possibleTip)
|
||||
}
|
||||
return retval
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</textarea></form>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue