What does the value of data-p means in JSSOR demos and examples? - jssor

I've looked through all the examples and demos and browsed the documentation, but I can't find the meaning of the numerical values of data-p attribute inside of some DIV tags. I see the numbers such as 816.0, 170.0 and 112.50, but can't figure it out. What does it mean?
Please advice.
Thanks.

It means css style perspective.
170 means
style="perspective: 170px;"

Related

monaco-editor: vertical line padding

Inspired by IntelliJ's 3 panel merge conflict view, I am trying to build something similar for vscode. I figured out, that I can integrate three complete customizable monaco-editors within a vscode Webview. But I cannot figure out, how monaco-editor applies the line padding in its diff-view like in the picture below (as I don't want to have a two-way but a 3-way diff using the internal diff-view is not an option for me):
Is it done through custom lineNumbers: lineNumber => isPaddingLine ? '' : lineNumber - someOffset, and inserting empty lines ("padding lines") at the related place and apply a deltaDecorations to those lines?
I hope there is a more easy way, which does not need the "padding lines" hack. Ideally I could just add something to a deltaDecoration like padding-bottom: $Xem
If I have just overlooked a way with vscode's api to achieve something like that, that would be of course more welcome than to deal directly with monaco-editor.
Thx a lot for any help / ideas :)
I finally found it :) IViewZone is the used magic.
And https://microsoft.github.io/monaco-editor/playground.html#interacting-with-the-editor-listening-to-mouse-events is a nice example

How to clear a material-ui md-field component in Vuejs2?

I have a simple list component in Vue2 with the ability to add/delete items. My issue was that when I switched from a regular HTML element to material-ui (https://vuematerial.io/), my input-clearing functionality broke.
This is what it looked like:
With the regular HTML element, I was simply targeting the element by ID (from within the methods of my component script) and assigning it an empty string to clear it, as so:
if (input.value !== '') {
this.items.push({
text: input.value
})
input.value = ''
}
I found the solution, which I'll answer below, but again, my question was: How do I clear the field when using a material-ui element? And the bonus question, which I haven't fully answered for myself: Why did it break?
So, first the "how" to make it work:
I needed to set a "v-model" attribute on my element (I called it "inputField"), and then initialize it to empty within the component's data properties, and THEN in my component methods "addInput" function, I had to set "this.inputField = ''" instead of "input.value = ''".
To illustrate:
So, that works. Here's the result:
Now, that just leaves the question of exactly how this all works, and why the method which worked for a regular HTML failed on ? I'm not sure, and I'd welcome an explanation/education from anyone who can explain!
Vue DevTools for Chrome seems to give a hint:
"Mdclearable" seems intuitively to be related; this property is set to false. Is that something to do with it? I'm not sure.
Learning a bit more about Vue's "v-model" and reactivity was also helpful in solving this.
Again, additional comments welcome to help elucidate what is going on here! And I hope this Q&A will help someone else possibly avoid some frustrations in future.

LibreOffice macro get index current sheet

Does someone know how to get the index of the current sheet in LibreOffice Macro Basic?
I successed to get the name:
cursheet = my_doc.getcurrentcontroller.activesheet.Name
But how to get index?
Moreover is there a place to find the documentation of all this component and basic language?
TY for your help.
Looks like two qestions in one... Regarding the documentation, you may start at the OOo Wiki or the LO Wiki on Basic, respectively. For a more complete guide, check Andrew Pitonyak's resources on OpenOffice macros. Usually, all solutions working for OpenOffice.org should work with LO, too.
Regarding the index of the current sheet: as usual, the OpenOffice.org forums know the answer:
sSheet.RangeAddress.Sheet

Facebook Open Graph Aggregation with Layout Style Map

I didn't find any documentation on how to create an aggregation with Layout Style Map. There are some input fields in the og app settings I don't understand what they are for.
For single actions these are:
Numbers: Header, {number selector} (count, expires_in), units
Highlighted Points
Route: {Geo Point [] selector}
And for multiple actions there is only one field which is
Contributing Point: {Geo Point selector}
What is the meaning of all these fields and how do I use them? Any explanation, documentation or tutorial would be great! Thanks!!!
Ok, finally found the documentation I've been searching for so long: https://developers.facebook.com/docs/opengraph/define-units/
Update (new url): https://developers.facebook.com/docs/opengraph/creating-custom-stories/#maplayout

Three lines of code look the same and only one works. Why?

I have some GWT code here. I am trying to change the background color of a widget:
this.getElement().setAttribute("backgroundColor", backgroundColor);
this.getElement().setPropertyString("backgroundColor", backgroundColor);
this.getElement().getStyle().setProperty("backgroundColor", backgroundColor);
Usually in code I can tell by the name of the function what the code does... but in this case all three lines of code looks the same and "read the same"! (Reading the javadoc did not help either.I went to the javadoc because that usually helps me understand what code does. The javadoc did not help.)
My question to you is: Please explain what is the differences between these three lines of code (for instance why do you need to call getStyle())? Why does the last line work?
this.getElement().getStyle().setProperty("backgroundColor", backgroundColor);
is the only line that access the actual style information, properties and attributes manipulate the element directly and don't have anything to do with the Style that is associated with an element.
And just as an addition, you should really be using a style sheet and changing the style instead of setting inline this way.
It is the difference between
<tag backgroundColor="#f0f0f0">
and
<tag style="background-color:#f0f0f0">
This is somewhat of an educated guess...
Line 1 you are accessing the element's attributes not the styling attributes.
Line 2 would access properties on the element not the styling.
Line 3 actually gets the styling properties and then changes them accordingly.