I'm creating an application which can be used to make an overview of your IT-Landscape. Currently it can show a table with the interfaces in your environment and their connected applications. It is also capable of creating an SVG image from this data. The data it self can be added via API calls.
I started with a project via:
leiningen new luminus versiontracker +h2 +shadow-cljs +kee-frame +swagger +(some other)
To be able to generate the SVG file with drag-and-drop support I added rid3 to the project .clj file.
When I run the application in development mode:
lein repl
and
lein shadow-cljs watch app
I can drag any item in the SVG file that is generated. I can click on a circle and drag it to any place I want.
However when I create the 'production' version with:
lein uberjar
and then run this application using:
java -Dconf=config.edn -jar versiontracker.jar
Dragging an object is not working properly. The whole SVG is selected instead of a single object within the SVG image; which result in strange drag-and-drop behavior.
Looking at the event through the console window I can see different behavior.
In the development environment if I grab a circle (which has the drag function attached) the srcElement in the sourceEvent is the text that is displayed on top of this circle. Although not the circle is selected dragging works as expected. The selected item follows the mouse while dragging.
In the 'production' environment if I grab a circle the srcElement in the sourceEvent is the complete svg; which result in strange drag-and-drop behavior. The selected item does not follow the mouse but the items do start moving around in an unpredictable way.
Go to Version Tracker download the release with tag V0.3.0 for the production version (there is also an H2 database with some sample data) and compare it to the development version by checking out the project.
Any help is appreciated
Your error description is a bit lacking and the project is far too complex to quickly reproduce.
Do you get any externs inference warnings when building? Do you get any errors/warnings in the Browser console with a production build?
The most likely cause here is externs. Meaning that property names such as in this (set! (.-fx d) (.-x event)) may end up getting renamed or stripped. As such it would break any behavior that relies in picking the correct names. See the documentation for further info on the subject. It might be enough to add a couple ^js hints in the proper places.
You are also using a rather old shadow-cljs version (current as of today is 2.16.10). So you need to opt-in to get externs inference warnings via :compiler-options {:infer-externs :auto} in your build config. The newer versions have this enabled by default.
Related
I am using phantom(6.0.3) to take screenshot of an angular page and send the html as email, using nodemailer(2.6.4). The angular page also has a few Highcharts(7.0.0) inside it. When the page is opened in a web browser in my local, QA and Prod env, all the chart looks as expected. But, when I send the same page in email(using phantom), the Highcharts inside the email in the local and QA versions look as expected, but the Prod version of the email shown some issues(screenshot below) - like the data labels almost goes to the edge of the chart and the legends start overlapping with each other!
I have no clue as what might be causing these issues particularly in Prod environment, as I am using the same versions of all the above mentioned packages(node, phantom, highcharts etc.) in all the environments (local, qa and prod).
The only thing I could find out while debugging the raw source of the email message is that the 'g' elements in the faulty charts has a different transform=translate(...,...) values, and that's causing the mis-alignment. But I cannot figure out what is the root cause behind this behavior, as I am using the same version of all the packages and only the deployment environment is different. Could it be any external module that is influencing this different rendering? Any help/suggestions would be appreciated.
Here are the screenshots of the Highchart trends from two different emails :
1. Correct Label Positions ->
2. Faulty Label Positions ->
3. Correct Legend Positions ->
4. Faulty Legend Positions ->
Screen capture of Material styled screen
I need help configuring Material with my Swift project.
As you can see I am able import Material into my project, however the buttons (except for the switchControl) are not appearing. The assets can be seen in the project's Media Library.
I don't know how to test my integration. I'm looking at the MaterialIcon.swift file because I don't think that the path to resources is correct.
I've compared my build to the examples provided by CM and I need help.
Thanks.
If you are using CocoaPods to setup your project, which I think you are based on your issue. You have two options:
Clean the build folder and delete the UserDerived directory, as well, ensure you are using 1.0* of CocoaPods.
Copy the Assets catalog into your application.
All the best :)
Make sure that you are giving the elements a size also.
Let Button = FabButton()
Button.setButtonTitle(title: "Button", forState: .Noarmal)
view.addSubview(Button)
View.Layout(Button).top(0).left(0).width(80).height(80)
I am trying to port over a bit of code from wx2.8 to wxPheonix (3.0.3.dev78356 msw). I'm using code from the pyfa project (https://github.com/DarkFenX/Pyfa) which is currently being rewritten for python3. This code takes some concepts from PyCollapsiblePane and implements it better (there are some bugs with PCP). If you download and open pyfa, the collapsible panels are on the right side (resources, resistances, etc) if you want to get a feel for how it is supposed to work.
Anyway, I'm trying to port this over and I cannot seem to get it to work well. I know Pheonix introduces some changes to sizers and how things are resized. I am able to collapse the panel (and have the parent panel fit to the new size), and then open it again. But when I try to collapse it again nothing seems to happen.
Here's what is currently happening:
http://gyazo.com/68717f66c498d850ef60ee83e1c0ae4a
And here is how it's suppposed to work (wxPython 2.8 in the pyfa app)
http://gyazo.com/87cc0f61052dca0e81c387da0f84c0c4
This is the module that I'm working on (the script has a test case if run directly): http://pastebin.com/ghuVGXWN
Any ideas?
I had to remove self.SetMinSize(sz) from OnStateChange, works great now.
I'm using Bootstrap files within my application and I want to enable "Use runtime optimized JavaScript and CSS resources".
the problem I have is once enabled; glyphicons-halflings-regular.eot, glyphicons-halflings-regular.svg and glyphicons-halflings-regular.woff cannot be found:
I know for Bootstrap 2.3 we could use a Theme that loads a .CSS file that changes relative locations as described here http://www.bootstrap4xpages.com/bs4xp/site.nsf/article.xsp?documentId=F435B6DC54486B67C1257B6B002E5A6C&action=openDocument
So, what should I do to handle relative locations with Bootstrap 3?
You have to tweak the path to the web font resoureces in the Bootstrap CSS files.
Delete the part with "../" and replace it with the relative path to the font files within your project structure, e.g.
bootstrap/fonts/...
Then aggregation will load the fonts correctly.
This does not answer your question but if you want to use Bootstrap 3 you'd be MUCH better off using the Boostrap4Xpages project on OpenNTF.org. It will perform better and the resource aggregation will work better. It's easy to install and use but it is a plugin on the sever so that needs to be done. It's not self contained to the NSF. Try and move to this if at all possible.
Regarding the actual question. I'm not sure I know the answer specifically. I do know that using relative links can sometimes be a problem if the browser's URL doesn't have the page.xsp portion. So it works on the page.xsp and NOT the default launch XPage where the URL ends with the database.nsf. What I've done in the past there is set the application to launch to something like "start.xsp" and in that page in beforePageLoad to a redirect to "home.xsp". This forces the browser url to always show the page name and made life a little easier when dealing with adding projects to WebContent.
I have images titled like so in my app:
image~iPhone.png
image#2x~iPhone.png
In interface builder I am loading image.png into my UIImageView. I also programatically load some images into a different view using imageWithContentsOfFile. The images all load fine when I run in the simulator but I get no images when I run on the device. If I use the full name of the image in interface builder it works but I want iOS to distinguish between high res and lower res. I have tried a lot of different things but can't figure this out. I see this error in the debugger as well:
Could not load the "image.png" image referenced from a nib in the bundle with identifier "com.mycompany.myproject"
Xcode 4
Deployment Target 4.1
Base SDK 4.3
Thanks for any help.
Ok...so after much experimenting I got it working.
I had two images named:
image#2x~iPhone.png
image~iPhone.png
and I was trying to load them using IB or imageWithContentsOfFile using
image.png
This worked fine in the simulator but not on my device. I just got a blank white screen where the image should be.
I finally renamed the high resolution image to:
image~iPhone#2x.png
Moving the '#2x' modifier after the device modifier(~iPhone) when referencing my images allowed it to work the way I understood that it should from reading Apple's docs. I was under the impression that you didn't need to include the device modifier when referencing images but I had to.
To sum up, I am now using
- image~iPhone.png
to reference my images in IB and programatically for some images. I now get iOS recognizing that I am on a retina screen and loading the #2x images accordingly. So the #2x modifier had to go at the end and the ~iPhone modifier had to be included in the name of the '.png'.
That is what worked for me. Hope it helps someone else. Note that I am only building my app for iOS4.1 and above so there might be some issues with this if you are supporting previous version.
iOS does not automatically pick the right image for the device like that. You are going to have to write code to check which device it is, and set the image by full name.
e.g. if ([[UIScreen mainScreen] scale] == 2) // set hi res image
Or, you can just use the same image in both, and set the content mode to scale to fill. It will look the same.
EDIT: Try writing either ~iphone (lowercase), or just don't write ~iPhone at all on the file name. If your app is not universal, then writing the ~iphone suffix is completely pointless.
iOS file system is case sensitive and device modifiers should be lowercase, it should be
image~iphone.png
image#2x~iphone.png
The #2x comes before the device modifier.
See the resource programming guide