Comments (2)
Description:
The first call redraw() appears in a constructor (line 79). But component is not in focus, so
if (this.options.enableCursor && this.isFocus) this.DrawCursor()
not executes
But there is also no call of this.DrawCursor() In the chain:
focus() -> AddEvent() -> window.setInterval(this.cursorTimerEvent.bind(this), this.options.cursorStyle.speedSwap) -> this.displayCursor(true, this.blindStatus, this.cursorWorldPosition)
on fireTextChange() the cursor can be drawn on line(368)
if (this.textComponent.height - this.lastComponentHeight > 0) this.redraw()
but it will not, because by default textComponent.height = 40 and lastCimponentHeight = 40 + 10 = 50. Even if padding = 0, the condition will 40-40 > 0 = false. Probably it should be >= ?
Accroding to that i fixed it in my code by such hack
option.onFocus = ()=> {
//only to compute this.changeCursorPosition(cursorPosition)
drawInput.fireTextChange(option.value,option.value,option.value.length);
//only for drawCursor
drawInput.redraw();
}
I wish you will fix that soon better way as you understand you sources much better
from pixi-drawable-textinput.
hello, thank you for this issue, I created the single Line function but I do not use it personally I did not notice the bugs, it must be a simple cursor location error, I am looking at that soon
from pixi-drawable-textinput.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pixi-drawable-textinput.