hiding multiplicity for cconnectors using CSS [message #1784410] |
Tue, 27 March 2018 17:52 |
|
I'm working on a SysML Model using Papyrus .
On an IBD, there are multiple flowports connecting the outside of the block to various parts where the transformations and routing occur.
By design, all ports, and therefore all connectors, have a multiplicity of 1.
I can easily use CSS to remove the multiplicity on ports:
Port {
maskLabel: name;
However, I can't seem to find the right css to get rid of all the connector ends; multiplicity...
I tried:
Connector {
sourceDecoration: none;
targetDecoration: none;
} /* did not really expect this to work...
Port {
maskLabel: name;
}
ConnectorEnd {
maskLabel: none;
}
Would anyone have a suggestion to resolve this?
TIA
/Charles Rivet
|
|
|
Re: hiding multiplicity for cconnectors using CSS [message #1784449 is a reply to message #1784410] |
Wed, 28 March 2018 07:04 |
Camille Letavernier Messages: 952 Registered: February 2011 |
Senior Member |
|
|
Hi Charles,
The Mask Label is used to define the text of configurable labels (Such as Port or Property, where a single label displays the Name/Type/Multiplicity/etc)
For Connectors, you're actually manipulating 3 different label elements: one for the name, and two for the multiplicities (This is actually similar to Associations). So what you want to do is actually hide these extra two labels, and only keep the Name one. So maskLabel is not the correct. source/target decoration won't help either, as they are used to remove the arrow-ends of connectors (But CompositeDiagram Connectors already don't have such decorations, so there is nothing to remove)
So what you need to do is to actually 1) Identify the Multiplicity Labels of the Connector, and 2) Set their visible property to false:
Connector > Label[kind=SourceMultiplicity],
Connector > Label[kind=TargetMultiplicity] {
visible: false;
}
In general, you can find the "kind" of Labels by selecting a Connector (Or any other edge, e.g. Association) in a Diagram, then select Filter > Show/Hide Labels. The "kind" of the label is the value in the "Label Role" column
HTH,
Camille
Camille Letavernier
|
|
|
Re: hiding multiplicity for cconnectors using CSS [message #1784506 is a reply to message #1784449] |
Wed, 28 March 2018 19:32 |
|
Thank you Camille,
Your suggestion to use "Filter > Show/Hide Labels." is a great tip!
My current css file (an external file that I refer to as a diagrams stylesheet for an IBD) now contains :
Port {
maskLabel: name;
}
Connector > Label[kind=SourceMultiplicity],
Connector > Label[kind=TargetMultiplicity] {
visible: false;
}
The port label now only shows the name, as expected, however, this still does not remove the connectors' multiplicity.
Going through "Show/Hide Labels" and unchecking their respective checkbox does result in the labels not being shown...
What am I doing wrong?
/Charles Rivet
|
|
|
Re: hiding multiplicity for cconnectors using CSS [message #1784535 is a reply to message #1784506] |
Thu, 29 March 2018 07:22 |
Camille Letavernier Messages: 952 Registered: February 2011 |
Senior Member |
|
|
Hi Charles,
I've tested that in the CompositeDiagram only; it's quite possible that the IBD doesn't fully support CSS (Although, since SysML1.4, they should now be pure Papyrus/UML Diagrams, and should thus have the same set of supported features)
Also note that user actions take precedence over CSS Customization, so if, for an existing diagram, you have already used the manual Show/Hide Label feature, then CSS will no longer be taken into account. I'll have a deeper look to CSS in SysML Diagrams later today
Cheers,
Camille
Camille Letavernier
|
|
|
|
Re: hiding multiplicity for cconnectors using CSS [message #1784593 is a reply to message #1784581] |
Thu, 29 March 2018 20:47 |
|
Thanks again Camille.
This was a model migrated from a previous version of SysML - perhaps there is something strange there. I'l try with a new model to see what happens.
Would you know if there is a way to "reset" user action? IF not, I'll still have a copy of that model from before I stated playing with it...
/Charles Rivet
|
|
|
|
|
Re: hiding multiplicity for cconnectors using CSS [message #1802798 is a reply to message #1784410] |
Sat, 16 February 2019 10:19 |
William ufghj Messages: 1 Registered: February 2019 |
Junior Member |
|
|
To hide the scrollbar use -webkit- because it is supported by major browsers (Google Chrome, Safari or newer versions of Opera). There are many other options for the other browsers liteblue which are listed below:
-webkit- (Chrome, Safari, newer versions of Opera):
.element::-webkit-scrollbar { width: 0 !important }
-moz- (Firefox):
.element { overflow: -moz-scrollbars-none; }
-ms- (Internet Explorer +10):
.element { -ms-overflow-style: none; }
[Updated on: Wed, 20 February 2019 04:40] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.05913 seconds