add / apply custom databar to image in DigitalMicrograph GMS3 - dm-script

I have an image that I want to apply a custom databar to via a script in DigitalMicrograph 3.21.1374.0. I would also like to apply a custom layout (separate question here: Apply Custom Layout to Image in DigitalMicrograph GMS3).
The procedure that I currently do by hand is:
Right click on the image
Hover on layout (in context menu)
Left click "Add Databar"
Select the custom databar in dialog that pops up (the one I want is called "CheckDataBar")
Click OK
This works flawlessly - except that I would like to run a script to do it (so I can loop all the open images and apply the databar).
Here is the code that I have so far to do just one image:
//main - get front image and apply custom databar
image Img := GetFrontImage()
imageDisplay imgDisplay = Img.ImageGetImageDisplay(0)
ApplyDataBar(imgDisplay)//this only adds the scale bar not the custom databar that i would like
I have tried ApplyDataBar(imgDisplay, CheckDataBar) but that does not work.
Any ideas?

ApplyDatabar() is an old command from earlier GMS versions and will only add the scalemarker.
However, this answer to your other question ( applying layouts ) can also be used to apply the databar, provided the databar is part of the layout.
So, you have to create a layout which contains the custom databar first. Then you apply the layout to the imageDocument not the imageDisplay.

Related

CKeditor image toolbar without upload

CKeditor5 by default has image plugins that support toolbar icons which can insert an image by (a) uploading the image and (b) insert an IMG tag into the HTML.
We do not want any capability to upload an image, but we need a simple widget that takes user input and inserts an image tag with attributes (user supplied) including e.g. SRC, HEIGHT, WIDTH, CLASS.
Seems strange that this isn't available in the standard build, have I missed it somehow?
Do we have to write our own plugin?
Custom build your CKeditor here:
https://ckeditor.com/ckeditor-5/online-builder/
Use toolbar item 'imageInsert'
relevant plugins:
Image,
ImageCaption, // adds ability to caption image via the toolbar
ImageInsert,
ImageResize, // this will cause resize handles to appear in the editor, operates by applying CSS to the enclosing <figure> tag
Also useful plugin
LinkImage, // adds link capability when editing an inserted image
Found the relevant doc here
https://ckeditor.com/docs/ckeditor5/latest/features/images/image-upload/images-inserting.html

Webflow - logo image turns into to grayscale while the element and all parent elements have this Effect set to off

I'm very new to Webflow. I am somewhat familiar with CSS and web design concepts.
I downloaded one of the clonable templates to use as a practice:
https://webflow.com/made-in-webflow/website/Spaces-Urbanistic
With this template, I try to replace the logo image on the upper left.
I have a colorful webpage logo and inside the designer, I see all the colors.
When I click on preview, the logo turns into a grayscale image.
Webflow has Effects option that I could enable, but it is currently set to off, for Logo image element as well as all parent nodes up to the body tag.
When I inspect the logo in chrome dev tools, the immediate parent has this CSS:
element.style {
filter: invert(100%)
grayscale(100%)
contrast(128%);
}
My question is, where do those filter parameters are stored in webflow interface, if not under Style->Effects->Filters? Is there any other place I don't yet know about where the above code can be injected?
Thank you,
edit-1: I just noticed this code on top of the main HTML file:
Still, doesn't help me to identify where this code comes from. Thank you,

How to extend the Image plugin in ckeditor5 with custom elements?

We're evaluating an upgrade from ckeditor 4 to the new ckeditor 5, but I need to be able to extend the Image plugin/package with some custom elements, e.g. a text input for licensing information about the image, a button/checkbox for toggling the image to be a thumbnail or not etc.
How can I add these custom elements in the image package and write my own javascript code to handle the values from these elements?
The image toolbar is being controlled by the config.image.toolbar property. It accepts names of UI components registered in the editor.ui.components factory. In other words, it works like the main editor toolbar which is configurable via editor.toolbar and you can learn more how to create buttons here: Creating a simple plugin.

prestashop 1.6 how to move logo to center and search bar to left

I need to move logo to center and search bar to left. I've created a new tpl called logo.tpl. where do I need to include before HOOK_TOP? I need a controller file to do that
They way to go is to make a simple module, which uses hookDisplayTop.
Return the logo block using this function, and then got to Modules > Positions and swap the block positions around. You won't be able to insert a custom block into the $HOOK_TOP variable unless you use the hook (displayTop).
Another idea: why not just attach the logo markup to the search block ? Modify the blocksearch-top.tpl and remove the original block from the header. This probably event better.

In Dojo I can't get a nested ContentPane in a StackContainer to resize when new content is added to it

I have a StackContaner which contains multiple ContentPanes. When I try to add content to a nested ContentPane (after it has been created and rendered), it doesn't resize, it always keeps it's initially size. Is there an easy way to get around this? Here is how it is laid out:
StackContainer
-ContentPane
--ContentPane (nested)
-ContentPane
Here is working example example:
http://jsfiddle.net/zzdyM/1/
Click the add button in the sample, I want to make it so the divs automatically resize the height to show the new content, instead of keeping the same height with scrollbars. Clicking the button should add another span element to the innerPane, not replace what is currently there.
Any ideas what I'm doing wrong?
Are you trying to achieve a specific layout or just replace the existing content "Blah Blah Blah" with new content?
If you just wish to replace existing content with new content, the following is the best option:
dijit.byId('innerPane').attr('content','<span>Added Content</span>');
See updated fiddle: http://jsfiddle.net/YdZyZ/1/