Skip to content

Commit

Permalink
Always hide scrollbar on textarea, add rows fudge factor
Browse files Browse the repository at this point in the history
  • Loading branch information
jmthomas committed Nov 22, 2024
1 parent 5554507 commit 60973a3
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# GNU Affero General Public License for more details.
# Modified by OpenC3, Inc.
# All changes Copyright 2023, OpenC3, Inc.
# All changes Copyright 2024, OpenC3, Inc.
# All Rights Reserved
#
# This file may also be used under the terms of a commercial license
Expand Down Expand Up @@ -180,7 +180,9 @@ export default {
},
numRows() {
// This is because v-textarea doesn't behave correctly with really long monospace text
return this.rawData.split('\n').length
let lines = this.rawData.split('\n').length
// Add a small fudge factor every 2000 lines to prevent clipping at the bottom
return lines + Math.floor(lines / 2000)
},
},
mounted() {
Expand Down Expand Up @@ -363,5 +365,6 @@ export default {
.v-textarea :deep(textarea) {
margin-top: 10px;
font-family: 'Courier New', Courier, monospace;
overflow-y: hidden;
}
</style>

0 comments on commit 60973a3

Please sign in to comment.