Fixed styling.
This commit is contained in:
		
							parent
							
								
									95143d8034
								
							
						
					
					
						commit
						da80aeabfd
					
				@ -61,6 +61,7 @@ class FlameLinkCollectionGallery extends Component {
 | 
				
			|||||||
    getGalleryInfo(schemaDetails, schemaContent) {
 | 
					    getGalleryInfo(schemaDetails, schemaContent) {
 | 
				
			||||||
        var key;
 | 
					        var key;
 | 
				
			||||||
        var mediaNums = []
 | 
					        var mediaNums = []
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        for (var val in schemaDetails) {
 | 
					        for (var val in schemaDetails) {
 | 
				
			||||||
            key = schemaDetails[val].key
 | 
					            key = schemaDetails[val].key
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@ -72,10 +73,11 @@ class FlameLinkCollectionGallery extends Component {
 | 
				
			|||||||
        for (var val3 in global.mediaIDs) {
 | 
					        for (var val3 in global.mediaIDs) {
 | 
				
			||||||
            mediaNums.push(val3)
 | 
					            mediaNums.push(val3)
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        return mediaNums.map(this.createGallery);
 | 
					        return mediaNums.map(this.createGallery);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    createGallery(num) {
 | 
					    createGallery = num => {
 | 
				
			||||||
        return <FlameLinkCollectionGalleryContent num={num} key={global.mediaIDs[num]} />
 | 
					        return <FlameLinkCollectionGalleryContent num={num} key={global.mediaIDs[num]} />
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -85,7 +87,7 @@ class FlameLinkCollectionGallery extends Component {
 | 
				
			|||||||
        return (
 | 
					        return (
 | 
				
			||||||
            <Grid container>
 | 
					            <Grid container>
 | 
				
			||||||
                {this.getGalleryInfo(this.state.schemaDetails, this.state.schemaContent)}
 | 
					                {this.getGalleryInfo(this.state.schemaDetails, this.state.schemaContent)}
 | 
				
			||||||
                <Typography variant='display3' className={classes.flamelinkItem}>
 | 
					                <Typography variant='display2' className={classes.flamelinkItem}>
 | 
				
			||||||
                    {this.state.schemaDescription}
 | 
					                    {this.state.schemaDescription}
 | 
				
			||||||
                </Typography>
 | 
					                </Typography>
 | 
				
			||||||
                <Grid container className={classes.flamelinkGalleryContainer}>
 | 
					                <Grid container className={classes.flamelinkGalleryContainer}>
 | 
				
			||||||
 | 
				
			|||||||
@ -9,23 +9,23 @@ class FlameLinkCollectionGalleryContent extends Component {
 | 
				
			|||||||
        global.galleryImages = [];
 | 
					        global.galleryImages = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.state = {
 | 
					        this.state = {
 | 
				
			||||||
          mediaURL: '',
 | 
					            mediaURL: '',
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        flamelinkApp.storage.getURL(global.mediaIDs[this.props.num])
 | 
					        flamelinkApp.storage.getURL(global.mediaIDs[this.props.num])
 | 
				
			||||||
                    .then(url => this.setState({
 | 
					            .then(url => this.setState({
 | 
				
			||||||
                      mediaURL: url
 | 
					                mediaURL: url
 | 
				
			||||||
                    }))
 | 
					            }))
 | 
				
			||||||
      }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    addURLs(){
 | 
					    addURLs = () => {
 | 
				
			||||||
        if(this.state.mediaURL === ''){
 | 
					        if (this.state.mediaURL === '') {
 | 
				
			||||||
        }
 | 
					        } else {
 | 
				
			||||||
        else{
 | 
					 | 
				
			||||||
            var element = {}
 | 
					            var element = {}
 | 
				
			||||||
            element.original = this.state.mediaURL;
 | 
					            element.original = this.state.mediaURL;
 | 
				
			||||||
            global.galleryImages.push(element);
 | 
					            global.galleryImages.push(element);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        return null;
 | 
					        return null;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -8,24 +8,23 @@ class RenderGallery extends Component {
 | 
				
			|||||||
        super();
 | 
					        super();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.state = {
 | 
					        this.state = {
 | 
				
			||||||
          showThumbnails: false,
 | 
					            showThumbnails: false,
 | 
				
			||||||
          showIndex: true,
 | 
					            showIndex: true,
 | 
				
			||||||
          showBullets: true,
 | 
					            showBullets: true,
 | 
				
			||||||
          mounted: false,
 | 
					            mounted: false,
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        componentDidMount(){
 | 
					 | 
				
			||||||
        this.setState({mounted: true})
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    _onImageLoad(event) {
 | 
					    componentDidMount() {
 | 
				
			||||||
    console.debug('loaded image', event.target.src);
 | 
					        this.setState({ mounted: true })
 | 
				
			||||||
  }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    _onImageLoad = event => {
 | 
				
			||||||
 | 
					        console.debug('loaded image', event.target.src);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    render() {
 | 
					    render() {
 | 
				
			||||||
 | 
					        return (
 | 
				
			||||||
        return(
 | 
					 | 
				
			||||||
            <ImageGallery
 | 
					            <ImageGallery
 | 
				
			||||||
                items={global.galleryImages}
 | 
					                items={global.galleryImages}
 | 
				
			||||||
                showThumbnails={this.state.showThumbnails}
 | 
					                showThumbnails={this.state.showThumbnails}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user