I have problem with styling label of stream. Geoserver able create offset label of stream, but I can not find how create follow line with offset.
I try use informations from official documentary, but a did not find it.
I find some info, than offset and followline does not work together.
Sorry, my english grammar is really terible.
Thanx for answers
followLine and perpendicularOffset cannot be used toghether, the existing code does not support such combination.
In the past it was due to the lack of a offset curve generator, now it is available but its use needs to be added into the label rendering code.
If you are interested in making that happen read here: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
Related
I'm trying to extend the VisualEditor by adding custom functionality.
It was pretty easy to add stuff which is realized with a single HTML-tag without parameters. But now I try to add textcolor. I tried to replicate the LanguageAnnotation as that's pretty similar (using span lang=.. while I want span style=color:..).
But it looks like there are a lot more things which I have to change here & I don't understand.
I'd be very grateful for any kind of help here.
Edit: To provide more information: Currently I am trying to replicate the .toDomElements function which I struggle with because I can not find the place where to modify the exact tag syntax (style instead of lang).
Well, I'm not sure if it's the best possible solution, but I've managed this problem by replicating the LanguageAnnotatation, including the widget-system (I chose it because it was the closest one to what I wanted to accomplish as it uses CSS and the span-tag).
I've replicated the following classes, adjusting the attributes (language has lang and dir attributes, my color-annotation only the color attribute):
ve.ce.TextColorAnnotation.js
ve.dm.TextColorAnnotation.js
ve.ui.TextColorContextItem.js
ve.ui.TextColorSearchDialog.js
ve.ui.TextColorInspector.js
ve.ui.TextColorInspectorTool.js
ve.ui.TextColorSearchWidget.js
ve.ui.TextColorInputWidget.js
ve.ui.TextColorResultWidget.js
It works pretty good imo. The only problem I see right now (and which I am working on next) is that with this implementation, text (or background)-color can only be applied to text, but not to tables (only when marking the text inside a cell).
In Google Chrome, you can use shortcuts for elements with contenteditable='true':
CTRL + B : Set the highlighted text to bold, for example
What happens under the hood is, the <b> tag is attached or removed to the marked phrase, word whatever.
How is this done? Where do "they" know from, whether the element is already set to bold, and, primary question, where it is located?
I am asking this because i can't get rid of this problem, mentioned earlier today:
Get the highlighted text position in .html() and .text()
Edit:
I tried the following
Rich-Text-Editing
But first, it won't load correctly, but this should be caused by my own failure.
Second, for learning purposes, i would like to implent my own minified version.
As i am really at JavaScript, i could not figure out how this is be done.
document.getSelection() / window.getSelection() should work for whatever you'd like to do with the selected stuff.
Element styles get inherited. How this is kept track of depends on the CSS implementation.
Taking a look at the source code of Chrome might pretty much help.
I'm trying to convert docx containing equations to on Android. I came across docx4j which is great and tested the following sample (HtmlExporterNonXSTL):
https://github.com/plutext/docx4j/blob/android/src/main/java/org/docx4j/convert/out/html/HtmlExporterNonXSLT.java
However I noticed that it doesn't handler equations well - if some symbol or number has some power and/or indices their position is alway in the middle e.g.
k_{n+1}^2 (latex format)
is displayed as:
kn+12 (with 'n+12' having correct smaller font but they are both vertically aligned)
Is there any way to adjust CSS to handle powers and indices? (full formula conversion would be better but I guess it is not so easy). I'm new to docx4j but looks like somehow
handlePPr()
method will need to be modified in HtmlExporterNonXSLT example. Before I would dive into it I thought about asking is it even possible to accomplish it (any way to obtain the offset property of a run?
Disclosure: I'm docx4j project lead
You're welcome to modify HtmlExporterNonXSLT in order to fix your particular example, but as you say, full formula conversion would be better.
Here are links to three prior posts on that subject (newest first):
math-equations-and-docx-to-html-conversion-not-working
need-to-handle-latex-equation
math-expression-issue
I am trying to create a bracket system using HTML. I've found other solutions, however, most require lots of absolute/relative positioning or tables.
I'm looking for a way to make it flexible, so I can just change the HTML to change it from a 16-man bracket to a 64-man bracket.
[404 - link removed]
Now, I don't see much wrong with my current example, however, I'm just curious if there is anyone out there has some suggestions on improving or completely changing the way I am doing it.
I'd rather stay away from tables, and definitely stay away from any sort of positioning (this is meant to be flexible).
If you have any ideas, that would be great. :)
Thanks,
Andrew
That actually looks fairly good. What I would do to improve it is encapsulate the logic in a bit of Javascript, supply the bracket information in some sort of text format, and have the Javascript parse the text format to generate the bracket as deeply as you need it.
So I've read this article and from what I understand, each native browser widget is actually a combination of basic elements, styling and scripts. This begs the question - if they are consisted of basic building blocks, does that mean that there is a way of customizing them through JavaScript? And I don't mean in the replacement sort of way, as some JavaScript libraries/plugins do - simply by accessing their "Shadow DOM" properties and adding some CSS styles to them, for example. Also, this page has some use cases, but nothing practical.
Anyone ever tried anything like this? Is it possible at all? Downsides?
Thanks.
My main concern would be that the implementations of the shadow DOM would be different between browsers and then you are basically back to needing some sort of library to deal with it. I'm not sure if that is the case, but its worth considering. Also, given that there are so many widget libraries available and that is the standard way of handling most of these issues, is it worth taking on a whole new set of unknown issues instead of just working with known elements?