Comments (18)
Can you post a screenshot ?
from embed-js.
from embed-js.
from embed-js.
from embed-js.
For vine there is an option to set its width .
Writing the pdf/video css based on the device width is not great always because sometimes that is not taking the full device width and is wrapped inside a div of somewhat lesser width than the device's width. That will create problems for the user.
So better you write your own css based on the div width in which you are using the plugin and not the device width.
from embed-js.
You can always add your css over the default one according to your needs. If you have some solution that will be consistent in all cases then only it can be implemented in the plugin.
from embed-js.
Thnx. fixed it by getting the class width and parsing it true embed.js
var width = $('.forum').width();
var $window = $(window);
$window.resize(function resize(){
var width = $('.forum').width();
});
For the pdf and youtube i will create custom css for phones.
from embed-js.
Can you send a PR ?
from embed-js.
What is a PR :P
from embed-js.
Its Pull Request. see this
from embed-js.
Never did it before. Ill read it as soon as !
from embed-js.
Though your solution will work but i will have to include this responsiveness code inside the plugin as on each resize your code will reload the whole content. This means repeated http requests. Thats never good. I will see what i can do.
from embed-js.
can you also set in your next release the hight of the iframe fore VINE + 2 pixels? 158 seems te be to short for the last borderline from Vine
opts.vineOptions.width + 160
from embed-js.
currently working on a iframe refresh after resize window, i added class="ejs-vine-iframe" on the iframe:
var width = $('.element').width()-21;
var $window = $(window);
$('.ejs-vine-iframe').css({'width': width});
$window.resize(function resize(){
var width = $('.element').width()-21;
$('.ejs-vine-iframe').css({
'width': width,
'height': width+160,
});
$('.ejs-vine-iframe',window.parent.document).attr('src',$('.ejs-vine-iframe',window.parent.document).attr('src'));
});
from embed-js.
If default size is 500 for vine, and opening page with vine on smaller device the vine width is 500px.
resizing from large window to smaller works, vine shrinks too. but when resizing from very small to big window the vine does not resize bigger anymore,
maybey it's an solution to get the width of the element div and take a amount of pixels to lower the width. when resizing then always resize the vine box too.
from embed-js.
Actually here width that you set is maxWidth but i guess yours solution seems better .I will fix this
- When there is no width set it will take the width of whole div
from embed-js.
Now there are slight change in options
vineOptions:{
maxWidth:500,
type:'postcard', //'postcard' or 'simple' embedding
responsive:false // whether to make the vine embed responsive
},
I guess you can understand the function about how it works. If not do reply here. I am closing this issue now.
from embed-js.
thank you for this :)
from embed-js.
Related Issues (20)
- error when code language not specified.
- umd build throws error for youtube
- Add caching support HOT 3
- Remove play from all description
- replaceText option doesn't work HOT 1
- Fail compiling with Webpack (production env) HOT 4
- Import Error Gulp/Webpack Task HOT 3
- expected object, got undefined HOT 7
- Link containing '@' is not rendered correctly HOT 2
- The examples seem to be broken HOT 1
- demo fails HOT 1
- 404 link on website HOT 2
- Question: Any rich commenting components this? HOT 1
- Embedjs not working HOT 1
- Does not work on plain JS/jQuery HOT 1
- YouTube plugin not correctly parsing full urls HOT 1
- The codesandbox example in the readme doesn't work with youtube HOT 1
- Unsecure dependency HOT 2
- Looking for maintainers HOT 4
- Unable to use Emoji plugin via CDN
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from embed-js.