-
Notifications
You must be signed in to change notification settings - Fork 7
DRAFT: Leaflet map using IFrame #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
In the last few commit I did:
|
lexoyo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for the PR
Did you test it? Does it work?
dist/client/index.html
Outdated
| } | ||
| </style></head><body class="silex-loading"><div class="silex-loader silex-dialog">Loading | ||
| </div><link rel="stylesheet" type="text/css" href="css/admin.css?938790"><main class="silex-workspace"><div class="silex-main silex-dialog-hide silex-ui-full" id="gjs"></div></main><script src="js/main.js?938790"></script><script>silex.start() | ||
| </div><link rel="stylesheet" type="text/css" href="css/admin.css?216955"><main class="silex-workspace"><div class="silex-main silex-dialog-hide silex-ui-full" id="gjs"></div></main><script src="js/main.js?216955"></script><script>silex.start() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you change the favicon?
Why commit this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't saw that I published this file. It modifies on his own every time I run my code so I didn't saw that the favicon had changed.
src/ts/client/grapesjs/index.ts
Outdated
| /* @ts-ignore */ | ||
| editor = grapesjs.init(config) | ||
|
|
||
| // Remove default map block and component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything bellow should be in a grapesjs plugin in a separate file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be added in my next commit
src/ts/client/grapesjs/index.ts
Outdated
| console.warn('Localisation not found') | ||
| } | ||
| } catch (error) { | ||
| console.error('Erreur de géocodage:', error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On parle français alors finalement ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in the next commit, sorry didn't saw.
src/ts/client/grapesjs/index.ts
Outdated
| }, | ||
| view: { | ||
| onRender({ el }) { | ||
| el.style.border = 'none' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why here and not with the rest of the styles (width, height)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose to keep border: none in view.onRender because I wanted to ensure it remains fixed and is not overridden, as it prevents the default browser border on iframes. Width and height are placed in defaults.style to allow users to modify them with the StyleManager. But I can still move it if you want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, then this style needs to be output by the editor.getCss() or editor.getHtml()
I don't think this will be the case
Did you try to publish a website with it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested removing border: none and confirmed it doesn’t change anything: the iframe has no border thanks to frameborder="0". I also removed the empty view section to keep the code cleaner. I tested the map both in the Silex editor and the published site and everything works
dist/client/index.html
Outdated
| @@ -1,4 +1,4 @@ | |||
| <!DOCTYPE html><html lang="en" translate="no"><head><title>Silex</title><meta name="description" content="This is a public instance of Silex website builder. Build websites in the browser"><link rel="shortcut icon" href="assets/favicon.png?357271"><style>body { | |||
| <!DOCTYPE html><html lang="en" translate="no"><head><title>Silex</title><meta name="description" content="This is a public instance of Silex website builder. Build websites in the browser"><link rel="shortcut icon" href="assets/favicon.png?596140"><style>body { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls don't commit this, just revert the change and commit the reverted change
(use git revert or just put back the initial value)
src/ts/client/grapesjs/index.ts
Outdated
| }, | ||
| view: { | ||
| onRender({ el }) { | ||
| el.style.border = 'none' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, then this style needs to be output by the editor.getCss() or editor.getHtml()
I don't think this will be the case
Did you try to publish a website with it?
Hello I update the feature again.
I did add and change a lot of things:
Requesting feedback on the handleMessage implementation, guidance on fixing the persistence issue with map coordinates.