roycyang / sencha-touch-extensions Goto Github PK
View Code? Open in Web Editor NEWExtending Ext.Button in Sencha Touch 2.0
Extending Ext.Button in Sencha Touch 2.0
Your contribution is valuable to the open source community. It would be great if you could add a license . It would definitely help everyone. Thank you again.
The template config is currently set to:
template: [
{
tag: 'span',
reference: 'tapMask',
style: {
position: 'absolute',
width: '100%',
height: '100%',
boxSizing: 'content-box'
}
},
{
tag: 'span',
reference: 'badgeElement',
hidden: true
},
{
tag: 'span',
className: Ext.baseCSSPrefix + 'button-icon',
reference: 'iconElement',
hidden: true
},
{
tag: 'span',
reference: 'textElement',
hidden: true
}
]
You'll notice that the icon element is set to hidden. I looked at Sencha Touch 2.1 and see that's what the stock button does. So I presume FixedButton just does the same thing, and perhaps the button class shows it if an iconCls is set.
But in Sencha Touch 2.4, the stock button does not set the template config for icon element to hidden. Perhaps the code starts with the assumption it's visible and only hides it if necessary. Therefore, for FixedButton to work with 2.4, it also needs to remove that hidden value. Otherwise, the icon will not display if set.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.