Comments (7)
gm3.less will need to include the new toolbar.less for the changes to be visible.
from gm3.
@theduckylittle, I noticed in the example mapbook file that the print tool has an attribute icon-class
. Were you planning on specifying icons for each tool from within the mapbook?
from gm3.
The mapbook has a lot of left-overs. These shouldn't be any additional icon-class
attributes.
from gm3.
How would you like me to link specific icons to their respective toolbar tool?
If we kept the icon-class
attribute, it would require two small changes to render that icon:
src/gm3/actions/toolbar.js:51
iconClass: toolXml.getAttribute('icon-class')
src/gm3/components/toolbar.jsx:63
<span className="icon"><i className={tool.iconClass}></i></span>
from gm3.
Yes, but the icon itself is not important. Styling the button is more important and the button always has an icon whether or not it's rendered (which can be determined by CSS). I think we need to just change one line of code, https://github.com/geomoose/gm3/blob/master/src/gm3/components/toolbar.jsx#L61, to something like:
<button onClick={tool_click} key={tool.name} className={'tool tool-'+tool.name}>
I just rambled off the above, it may work, it may have a syntax error, it may light your CPU on fire. In any of those three equally likely scenarios, it adds the styling to the buttons in a way that is predictable to customize.
The above code also makes the LESS pretty easy. To control the default icon:
.tool {
.icon {
display: none;
}
}
To control a specific icon:
.tool-print {
/* other styling here, e.g. */
color: red; /* this would be ugly but noticeable, and changes the icon AND text color */
.icon {
}
}
Happy coding.
from gm3.
Related PR: #16
from gm3.
With the PR merged, I'm closing this one out.
from gm3.
Related Issues (20)
- URL Tracker - Bbox format doesn't exactly track the location anymore HOT 2
- Syncronize mapbooks and app.js across examples
- +/- Zoom Buttons zoom to whole world HOT 2
- Start Service from URL - Add catch error for incorrect field name
- Bookmark - Only pull layers + extent when including service parameters in URL
- Measure - Bearing Accuracy HOT 11
- Buffer All - Inconsistent logic when filtering
- Demo use of Min/Max filter is non-functional
- Add catch error for undefined layers in mapbook HOT 1
- ESRI WMS service ignores INFO_FORMAT=application/vnd.ogc.gml HOT 3
- Configure arbitrary static Legend images HOT 4
- Virtual Grid - Horizontal and Vertical Scrollbar don't work together HOT 1
- Add option to Close Measure Tool HOT 1
- Issue on Add highlight in WFS layer HOT 11
- Sort Grid Filter Results
- If Favorites are not Implemented, hide Stars in Catalog
- Select - KeepAlive - Enter to execute select
- Re-do Service button/Retain service history
- Map-Source AGS w/ WMS legend retrieval and display HOT 1
- Custom query does not work
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 gm3.